New config setting for the default value of xglamo_hack_enabled. Since this is a bug in Xglamo and not in the kernel, enabling the hack by default is not the right thing to do and on the contrary breaks xf86-video-glamo users as explained at:
http://docs.openmoko.org/trac/ticket/2255 Updated configurations to enable it by default, thus preserving previous settings. Signed-off-by: Luca Capello <[email protected]> --- arch/arm/configs/gta02_micro_defconfig | 1 + arch/arm/configs/gta02_moredrivers_defconfig | 1 + arch/arm/configs/gta02_packaging_defconfig | 1 + drivers/mfd/glamo/Kconfig | 5 +++++ drivers/mfd/glamo/glamo-fb.c | 5 ++++- 5 files changed, 12 insertions(+), 1 deletions(-) diff --git a/arch/arm/configs/gta02_micro_defconfig b/arch/arm/configs/gta02_micro_defconfig index ae30c4b..bd86c3d 100644 --- a/arch/arm/configs/gta02_micro_defconfig +++ b/arch/arm/configs/gta02_micro_defconfig @@ -708,6 +708,7 @@ CONFIG_PCF50633_GPIO=y CONFIG_MFD_GLAMO=y CONFIG_MFD_GLAMO_FB=y CONFIG_MFD_GLAMO_FB_XGLAMO_WORKAROUND=y +CONFIG_MFD_GLAMO_FB_XGLAMO_WORKAROUND_ENABLED=y CONFIG_MFD_GLAMO_SPI_GPIO=y CONFIG_MFD_GLAMO_SPI_FB=y CONFIG_MFD_GLAMO_MCI=y diff --git a/arch/arm/configs/gta02_moredrivers_defconfig b/arch/arm/configs/gta02_moredrivers_defconfig index 8d06cd6..b1366cc 100644 --- a/arch/arm/configs/gta02_moredrivers_defconfig +++ b/arch/arm/configs/gta02_moredrivers_defconfig @@ -1281,6 +1281,7 @@ CONFIG_PCF50633_GPIO=y CONFIG_MFD_GLAMO=y CONFIG_MFD_GLAMO_FB=y CONFIG_MFD_GLAMO_FB_XGLAMO_WORKAROUND=y +CONFIG_MFD_GLAMO_FB_XGLAMO_WORKAROUND_ENABLED=y CONFIG_MFD_GLAMO_SPI_GPIO=y CONFIG_MFD_GLAMO_SPI_FB=y CONFIG_MFD_GLAMO_MCI=y diff --git a/arch/arm/configs/gta02_packaging_defconfig b/arch/arm/configs/gta02_packaging_defconfig index dfdfb19..5e32b9c 100644 --- a/arch/arm/configs/gta02_packaging_defconfig +++ b/arch/arm/configs/gta02_packaging_defconfig @@ -1284,6 +1284,7 @@ CONFIG_PCF50633_GPIO=y CONFIG_MFD_GLAMO=y CONFIG_MFD_GLAMO_FB=y CONFIG_MFD_GLAMO_FB_XGLAMO_WORKAROUND=y +CONFIG_MFD_GLAMO_FB_XGLAMO_WORKAROUND_ENABLED=y CONFIG_MFD_GLAMO_SPI_GPIO=y CONFIG_MFD_GLAMO_SPI_FB=y CONFIG_MFD_GLAMO_MCI=y diff --git a/drivers/mfd/glamo/Kconfig b/drivers/mfd/glamo/Kconfig index efa1699..c76f24b 100644 --- a/drivers/mfd/glamo/Kconfig +++ b/drivers/mfd/glamo/Kconfig @@ -31,6 +31,11 @@ config MFD_GLAMO_FB_XGLAMO_WORKAROUND If unsure, say N. +config MFD_GLAMO_FB_XGLAMO_WORKAROUND_ENABLED + bool "Enable the Smedia Glamo 336x/337x Xglamo rotation workaround" + depends on MFD_GLAMO_FB_XGLAMO_WORKAROUND + help + Enable by default the workaround for a Xglamo bug. config MFD_GLAMO_SPI_GPIO tristate "Glamo GPIO SPI bitbang support" diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c index 44ab9a3..48cba29 100644 --- a/drivers/mfd/glamo/glamo-fb.c +++ b/drivers/mfd/glamo/glamo-fb.c @@ -338,10 +338,13 @@ static int will_orientation_change(struct fb_var_screeninfo *var) * See https://docs.openmoko.org/trac/ticket/2255 * We have a hack for some Xglamo bugs in kernel code. * If someone fixes xglamo we can remove this hack. - * We might make xglamo_hack_enabled 0 by default in the future. */ +#ifdef CONFIG_MFD_GLAMO_FB_XGLAMO_WORKAROUND_ENABLED static unsigned xglamo_hack_enabled = 1; +#else +static unsigned xglamo_hack_enabled = 0; +#endif static ssize_t xglamo_hack_read(struct device *dev, struct device_attribute *attr, char *buf) -- 1.6.3.1
