board-sx1.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Siemens SX1 board definitions
  3. *
  4. * Copyright: Vovan888 at gmail com
  5. *
  6. * This package is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  11. * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  12. * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14. #ifndef __ASM_ARCH_SX1_I2C_CHIPS_H
  15. #define __ASM_ARCH_SX1_I2C_CHIPS_H
  16. #define SOFIA_MAX_LIGHT_VAL 0x2B
  17. #define SOFIA_I2C_ADDR 0x32
  18. /* Sofia reg 3 bits masks */
  19. #define SOFIA_POWER1_REG 0x03
  20. #define SOFIA_USB_POWER 0x01
  21. #define SOFIA_MMC_POWER 0x04
  22. #define SOFIA_BLUETOOTH_POWER 0x08
  23. #define SOFIA_MMILIGHT_POWER 0x20
  24. #define SOFIA_POWER2_REG 0x04
  25. #define SOFIA_BACKLIGHT_REG 0x06
  26. #define SOFIA_KEYLIGHT_REG 0x07
  27. #define SOFIA_DIMMING_REG 0x09
  28. /* Function Prototypes for SX1 devices control on I2C bus */
  29. int sx1_setbacklight(u8 backlight);
  30. int sx1_getbacklight(u8 *backlight);
  31. int sx1_setkeylight(u8 keylight);
  32. int sx1_getkeylight(u8 *keylight);
  33. int sx1_setmmipower(u8 onoff);
  34. int sx1_setusbpower(u8 onoff);
  35. int sx1_i2c_read_byte(u8 devaddr, u8 regoffset, u8 *value);
  36. int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value);
  37. /* MMC prototypes */
  38. extern void sx1_mmc_init(void);
  39. extern void sx1_mmc_slot_cover_handler(void *arg, int state);
  40. #endif /* __ASM_ARCH_SX1_I2C_CHIPS_H */