The patch titled fbdev: allow more chip revisions in Epson s1d13... video driver has been removed from the -mm tree. Its filename was fbdev-allow-more-chip-revisions-in-epson-s1d13-video-driver.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: fbdev: allow more chip revisions in Epson s1d13... video driver From: Kristoffer Ericson <kristoffer.ericson@xxxxxxxxx> The Epson s1d13xxx hardware is common in many handhelds, but our driver is currently locked to a single chip revision. This patch adds an array of known to work revisions (which can be extended). [akpm@xxxxxxxxxxxxxxxxxxxx: cleanups] Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@xxxxxxxxx> Acked-by: Thibaut Varène <varenet@xxxxxxxxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Krzysztof Helt <krzysztof.h1@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/s1d13xxxfb.c | 23 +++++++++++++++++++---- include/video/s1d13xxxfb.h | 3 ++- 2 files changed, 21 insertions(+), 5 deletions(-) diff -puN drivers/video/s1d13xxxfb.c~fbdev-allow-more-chip-revisions-in-epson-s1d13-video-driver drivers/video/s1d13xxxfb.c --- a/drivers/video/s1d13xxxfb.c~fbdev-allow-more-chip-revisions-in-epson-s1d13-video-driver +++ a/drivers/video/s1d13xxxfb.c @@ -50,6 +50,11 @@ #define dbg(fmt, args...) do { } while (0) #endif +static const int __devinitconst s1d13xxxfb_revisions[] = { + S1D13506_CHIP_REV, /* Rev.4 on HP Jornada 7xx S1D13506 */ + S1D13806_CHIP_REV, /* Rev.7 on .. */ +}; + /* * Here we define the default struct fb_fix_screeninfo */ @@ -538,6 +543,7 @@ s1d13xxxfb_probe(struct platform_device struct fb_info *info; struct s1d13xxxfb_pdata *pdata = NULL; int ret = 0; + int i; u8 revision; dbg("probe called: device is %p\n", pdev); @@ -607,10 +613,19 @@ s1d13xxxfb_probe(struct platform_device goto bail; } - revision = s1d13xxxfb_readreg(default_par, S1DREG_REV_CODE); - if ((revision >> 2) != S1D_CHIP_REV) { - printk(KERN_INFO PFX "chip not found: %i\n", (revision >> 2)); - ret = -ENODEV; + revision = s1d13xxxfb_readreg(default_par, S1DREG_REV_CODE) >> 2; + + ret = -ENODEV; + + for (i = 0; i < ARRAY_SIZE(s1d13xxxfb_revisions); i++) { + if (revision == s1d13xxxfb_revisions[i]) + ret = 0; + } + + if (!ret) + printk(KERN_INFO PFX "chip revision %i\n", revision); + else { + printk(KERN_INFO PFX "unknown chip revision %i\n", revision); goto bail; } diff -puN include/video/s1d13xxxfb.h~fbdev-allow-more-chip-revisions-in-epson-s1d13-video-driver include/video/s1d13xxxfb.h --- a/include/video/s1d13xxxfb.h~fbdev-allow-more-chip-revisions-in-epson-s1d13-video-driver +++ a/include/video/s1d13xxxfb.h @@ -14,7 +14,8 @@ #define S1D13XXXFB_H #define S1D_PALETTE_SIZE 256 -#define S1D_CHIP_REV 7 /* expected chip revision number for s1d13806 */ +#define S1D13506_CHIP_REV 4 /* expected chip revision number for s1d13506 */ +#define S1D13806_CHIP_REV 7 /* expected chip revision number for s1d13806 */ #define S1D_FBID "S1D13806" #define S1D_DEVICENAME "s1d13806fb" _ Patches currently in -mm which might be from kristoffer.ericson@xxxxxxxxx are origin.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html