mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Platform: OLPC: Add XO-1.75 EC driver
It's based off the driver from the OLPC kernel sources. Somewhat modernized and cleaned up, for better or worse. Modified to plug into the olpc-ec driver infrastructure (so that battery interface and debugfs could be reused) and the SPI slave framework. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
committed by
Andy Shevchenko
parent
8097548f3a
commit
0c3d931b3a
@@ -2698,6 +2698,7 @@ config OLPC
|
||||
select OF
|
||||
select OF_PROMTREE
|
||||
select IRQ_DOMAIN
|
||||
select OLPC_EC
|
||||
---help---
|
||||
Add support for detecting the unique features of the OLPC
|
||||
XO hardware.
|
||||
|
||||
@@ -10,3 +10,5 @@ source "drivers/platform/goldfish/Kconfig"
|
||||
source "drivers/platform/chrome/Kconfig"
|
||||
|
||||
source "drivers/platform/mellanox/Kconfig"
|
||||
|
||||
source "drivers/platform/olpc/Kconfig"
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
obj-$(CONFIG_X86) += x86/
|
||||
obj-$(CONFIG_MELLANOX_PLATFORM) += mellanox/
|
||||
obj-$(CONFIG_MIPS) += mips/
|
||||
obj-$(CONFIG_OLPC) += olpc/
|
||||
obj-$(CONFIG_OLPC_EC) += olpc/
|
||||
obj-$(CONFIG_GOLDFISH) += goldfish/
|
||||
obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
|
||||
|
||||
14
drivers/platform/olpc/Kconfig
Normal file
14
drivers/platform/olpc/Kconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
config OLPC_EC
|
||||
bool
|
||||
|
||||
config OLPC_XO175_EC
|
||||
tristate "OLPC XO 1.75 Embedded Controller"
|
||||
depends on ARCH_MMP || COMPILE_TEST
|
||||
select SPI_SLAVE
|
||||
select OLPC_EC
|
||||
help
|
||||
Include support for the OLPC XO Embedded Controller (EC). The EC
|
||||
provides various platform services, including support for the power,
|
||||
button, restart, shutdown and battery charging status.
|
||||
|
||||
Unless you have an OLPC XO laptop, you will want to say N.
|
||||
@@ -1,4 +1,5 @@
|
||||
#
|
||||
# OLPC XO platform-specific drivers
|
||||
#
|
||||
obj-$(CONFIG_OLPC) += olpc-ec.o
|
||||
obj-$(CONFIG_OLPC_EC) += olpc-ec.o
|
||||
obj-$(CONFIG_OLPC_XO175_EC) += olpc-xo175-ec.o
|
||||
|
||||
752
drivers/platform/olpc/olpc-xo175-ec.c
Normal file
752
drivers/platform/olpc/olpc-xo175-ec.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ struct olpc_ec_driver {
|
||||
bool wakeup_available;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_OLPC
|
||||
#ifdef CONFIG_OLPC_EC
|
||||
|
||||
extern void olpc_ec_driver_register(struct olpc_ec_driver *drv, void *arg);
|
||||
|
||||
@@ -69,6 +69,6 @@ static inline bool olpc_ec_wakeup_available(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_OLPC */
|
||||
#endif /* CONFIG_OLPC_EC */
|
||||
|
||||
#endif /* _LINUX_OLPC_EC_H */
|
||||
|
||||
Reference in New Issue
Block a user