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