mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-06 00:13:38 -04:00
staging: olpc_dcon: allow simultaneous XO-1 and XO-1.5 support
This patch remove model related configuration. Since the module can decide which platform data to use itself base on current running olpc board. Also change module dependency from (GPIO_CS5535 || GPIO_CS5535=n) to (GPIO_CS5535 || ACPI) because original one does not make any sense and module only doing real work when GPIO_CS5535 or ACPI is setted. Remove kernel configurations: - FB_OLPC_DCON_1 - FB_OLPC_DCON_1_5 Signed-off-by: Jerry Lin <wahahab11@gmail.com> Link: https://lore.kernel.org/r/20190906010613.GA562@compute1 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c2e323290f
commit
e40219d5e4
5 changed files with 3 additions and 34 deletions
|
@ -3,7 +3,7 @@ config FB_OLPC_DCON
|
||||||
tristate "One Laptop Per Child Display CONtroller support"
|
tristate "One Laptop Per Child Display CONtroller support"
|
||||||
depends on OLPC && FB
|
depends on OLPC && FB
|
||||||
depends on I2C
|
depends on I2C
|
||||||
depends on (GPIO_CS5535 || GPIO_CS5535=n)
|
depends on (GPIO_CS5535 || ACPI)
|
||||||
select BACKLIGHT_CLASS_DEVICE
|
select BACKLIGHT_CLASS_DEVICE
|
||||||
help
|
help
|
||||||
In order to support very low power operation, the XO laptop uses a
|
In order to support very low power operation, the XO laptop uses a
|
||||||
|
@ -15,22 +15,3 @@ config FB_OLPC_DCON
|
||||||
This controller is only available on OLPC platforms. Unless you have
|
This controller is only available on OLPC platforms. Unless you have
|
||||||
one of these platforms, you will want to say 'N'.
|
one of these platforms, you will want to say 'N'.
|
||||||
|
|
||||||
config FB_OLPC_DCON_1
|
|
||||||
bool "OLPC XO-1 DCON support"
|
|
||||||
depends on FB_OLPC_DCON && GPIO_CS5535
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Enable support for the DCON in XO-1 model laptops. The kernel
|
|
||||||
communicates with the DCON using model-specific code. If you
|
|
||||||
have an XO-1 (or if you're unsure what model you have), you should
|
|
||||||
say 'Y'.
|
|
||||||
|
|
||||||
config FB_OLPC_DCON_1_5
|
|
||||||
bool "OLPC XO-1.5 DCON support"
|
|
||||||
depends on FB_OLPC_DCON && ACPI
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Enable support for the DCON in XO-1.5 model laptops. The kernel
|
|
||||||
communicates with the DCON using model-specific code. If you
|
|
||||||
have an XO-1.5 (or if you're unsure what model you have), you
|
|
||||||
should say 'Y'.
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
olpc-dcon-objs += olpc_dcon.o
|
olpc-dcon-objs += olpc_dcon.o olpc_dcon_xo_1.o olpc_dcon_xo_1_5.o
|
||||||
olpc-dcon-$(CONFIG_FB_OLPC_DCON_1) += olpc_dcon_xo_1.o
|
|
||||||
olpc-dcon-$(CONFIG_FB_OLPC_DCON_1_5) += olpc_dcon_xo_1_5.o
|
|
||||||
obj-$(CONFIG_FB_OLPC_DCON) += olpc-dcon.o
|
obj-$(CONFIG_FB_OLPC_DCON) += olpc-dcon.o
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ TODO:
|
||||||
internals, but isn't properly integrated, is not the correct solution.
|
internals, but isn't properly integrated, is not the correct solution.
|
||||||
- see if vx855 gpio API can be made similar enough to cs5535 so we can
|
- see if vx855 gpio API can be made similar enough to cs5535 so we can
|
||||||
share more code
|
share more code
|
||||||
- allow simultaneous XO-1 and XO-1.5 support
|
|
||||||
|
|
||||||
Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
|
Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -790,15 +790,11 @@ static struct i2c_driver dcon_driver = {
|
||||||
|
|
||||||
static int __init olpc_dcon_init(void)
|
static int __init olpc_dcon_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_FB_OLPC_DCON_1_5
|
|
||||||
/* XO-1.5 */
|
/* XO-1.5 */
|
||||||
if (olpc_board_at_least(olpc_board(0xd0)))
|
if (olpc_board_at_least(olpc_board(0xd0)))
|
||||||
pdata = &dcon_pdata_xo_1_5;
|
pdata = &dcon_pdata_xo_1_5;
|
||||||
#endif
|
else
|
||||||
#ifdef CONFIG_FB_OLPC_DCON_1
|
|
||||||
if (!pdata)
|
|
||||||
pdata = &dcon_pdata_xo_1;
|
pdata = &dcon_pdata_xo_1;
|
||||||
#endif
|
|
||||||
|
|
||||||
return i2c_add_driver(&dcon_driver);
|
return i2c_add_driver(&dcon_driver);
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,12 +106,7 @@ struct dcon_gpio {
|
||||||
|
|
||||||
irqreturn_t dcon_interrupt(int irq, void *id);
|
irqreturn_t dcon_interrupt(int irq, void *id);
|
||||||
|
|
||||||
#ifdef CONFIG_FB_OLPC_DCON_1
|
|
||||||
extern struct dcon_platform_data dcon_pdata_xo_1;
|
extern struct dcon_platform_data dcon_pdata_xo_1;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_FB_OLPC_DCON_1_5
|
|
||||||
extern struct dcon_platform_data dcon_pdata_xo_1_5;
|
extern struct dcon_platform_data dcon_pdata_xo_1_5;
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue