On Mon, Jun 21, 2010 at 07:03:07PM +0530, Rabin VINCENT wrote: > On Sat, Jun 19, 2010 at 01:42:24 +0200, Samuel Ortiz wrote: > > On Mon, May 31, 2010 at 05:47:14PM +0530, Rabin Vincent wrote: > > > Add support for the STMPExxxx family of I/O Expanders from > > > STMicroelectronics. These devices include upto 24 gpios, a PWM > > > controller, and a keypad controller. This patch adds the MFD core. > > The patchset looks fairly good, but before merging it I'd like to know of we > > could merge it with this one: > > https://patchwork.kernel.org/patch/106173/ > > > > I don't know enough about the hardware, and although the register layouts don't > > look like they have much in common, I'd like to know from the actual HW > > manufacturer (i.e. you :)) if there's something we can do here. > > I don't have any inside information about these parts (we just use them > on our U8500 dev boards), but all the datasheets are publicly > available[1]. There seems to be more than a dozen variants of this MFD > with varying combinations of devices. > > [1] http://www.st.com/stonline/stappl/productcatalog/app?path=/pages/stcom/PcStComPartNumberSearch.searchPartNumber&search=stmpe > > On Sat, Jun 19, 2010 at 15:50:16 +0200, Luotao Fu wrote: > > hmm, I took a quick look into the core driver. The register layout > > seems, as Samuel mentioned, quite different. However, the r/w > > functionalities and irq handling are quite the same. For now I'd say > > that should be possible to merge the stuff. > > The IRQ handling and GPIO block seem to be about the same (registers are > at different offsets, but this is also the case between STMPE1601 and > STMPE24XX and is thus already handled in the STMPExxxx driver). The > STMPExxxx GPIO driver should also already be able to handle a variant > with lesser gpios, such as STMPE811. > > Similarities: > - I2C access functions > - GPIO block (same registers, different offsets) > - IRQ block (same registers and handling, different irqs and different > register offsets) > > Differences: > - Different blocks (but sharing between different groups of variants) > - SYSCTRL register bits (reset, clock enabling) > - GPIO altfunc bits > - The STMPE811 also has a SPI interface, while most other support only I2C > This is also not avaiabile in Luotao's driver so I'm not addressing > this for now. > I2C is the most common usage variant. Otherwise adding spi access routines should be no big deal. Some additional to the probe function might be needed besides the r/w core functions. I do think that we leave the stuff this way and take care of them if somebody does need SPI. > Here's a preliminary patch (untested!) which shows how the STMPExxx can > be made more generic to support 811 and hopefully other variants. If > this looks sane, I'll complete it up, fold it in, and repost the > STMPExxxx series for review and also 811 testing and touchscreen > addition from Luotao. > I'll test the patch as soon as I can. Do you have any public GIT tree with the stmpexxx stuffs in them, so that I might be able to merge it with my board stuffs directly? cheers Luotao Fu -- Pengutronix e.K. | Dipl.-Ing. Luotao Fu | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |