[RFC] Freescale MC13783 PMIC support
mbox series

Message ID 1249981667-4366-1-git-send-email-s.hauer@pengutronix.de
State New, archived
Headers show
Series
  • [RFC] Freescale MC13783 PMIC support
Related show

Pull-request

git://git.pengutronix.de/git/sha/linux-2.6.git mc13783

Message

Sascha Hauer Aug. 11, 2009, 9:07 a.m. UTC
Hi all,

This series adds support for the Freescale MC13783 PMIC. The MC13783
is connected via SPI, the first patch adds basic support for it in
drivers/mfd. The rest of the patches can be applied independently.
Individual Maintainers are on Cc, the whole series can be found on
lkml and the Arm Linux Kernel mailing list.
Please ignore the previous mail which lacked the intrductory mail.

Sascha



The following changes since commit ed680c4ad478d0fee9740f7d029087f181346564:
  Linus Torvalds (1):
        Linux 2.6.31-rc5

are available in the git repository at:

  git://git.pengutronix.de/git/sha/linux-2.6.git mc13783

Luotao Fu (1):
      [hwmon] add Freescale MC13783 adc driver

Sascha Hauer (4):
      drivers/mfd: Add Freescale MC13783 driver
      [input] add mc13783 touchscreen driver
      [RTC] Add Freescale MC13783 RTC driver
      [regulator] Add a Freescale MC13783 regulator driver

 drivers/hwmon/Kconfig                  |    6 +
 drivers/hwmon/Makefile                 |    1 +
 drivers/hwmon/mc13783-adc.c            |  181 +++++++++++++
 drivers/input/touchscreen/Kconfig      |   12 +
 drivers/input/touchscreen/Makefile     |    1 +
 drivers/input/touchscreen/mc13783_ts.c |  228 +++++++++++++++++
 drivers/mfd/Kconfig                    |    8 +
 drivers/mfd/Makefile                   |    2 +
 drivers/mfd/mc13783-core.c             |  440 ++++++++++++++++++++++++++++++++
 drivers/regulator/Kconfig              |    8 +
 drivers/regulator/Makefile             |    1 +
 drivers/regulator/mc13783.c            |  410 +++++++++++++++++++++++++++++
 drivers/rtc/Kconfig                    |    6 +
 drivers/rtc/Makefile                   |    1 +
 drivers/rtc/rtc-mc13783.c              |  141 ++++++++++
 include/linux/mfd/mc13783-private.h    |  402 +++++++++++++++++++++++++++++
 include/linux/mfd/mc13783.h            |   79 ++++++
 17 files changed, 1927 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hwmon/mc13783-adc.c
 create mode 100644 drivers/input/touchscreen/mc13783_ts.c
 create mode 100644 drivers/mfd/mc13783-core.c
 create mode 100644 drivers/regulator/mc13783.c
 create mode 100644 drivers/rtc/rtc-mc13783.c
 create mode 100644 include/linux/mfd/mc13783-private.h
 create mode 100644 include/linux/mfd/mc13783.h


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Comments

Sascha Hauer Aug. 11, 2009, 1:57 p.m. UTC | #1
Hi Antonio,

On Tue, Aug 11, 2009 at 02:05:00PM +0200, Antonio Ospite wrote:
> On Tue, 11 Aug 2009 11:07:42 +0200
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > Hi all,
> > 
> > This series adds support for the Freescale MC13783 PMIC. The MC13783
> > is connected via SPI, the first patch adds basic support for it in
> > drivers/mfd. The rest of the patches can be applied independently.
> > Individual Maintainers are on Cc, the whole series can be found on
> > lkml and the Arm Linux Kernel mailing list.
> > Please ignore the previous mail which lacked the intrductory mail.
> > 
> > Sascha
> >
> 
> Hi Sascha,
> 
> the MC13783 is also named Atlas, isn't it?
> Maybe you can add this name somewhere in comments or in Kconfig entry
> to help greppers and web crawlers.
> 
> BTW, I only took a very brief look to some of your patches, and here's
> some humble thoughts, sorry if I don't comment patch by patch.
> 
> There is a driver queued for inclusion in 2.6.31 for the PCAP2
> PMIC, which is quite similar to MC13783. This driver uses the irq_chip
> mechanism to expose the PMIC IRQs to be used as general IRQs in
> sub-devices drivers (which you call client-devices AFAICS).

I can change the driver if there's consensus to do so.

> Also, it
> passed all the reviews so maybe you can give it a look to take some
> other solution already accepted by reviewers, like passing sub-devices
> via platform data (some of the phones which use PCAP2 don't have
> touchscreen, for instance),

This is indeed a useful feature. What I don't like about the pcap
approach is that the generation of the correct struct pcap_subdev
devices with the correct names is left to the board code.
Maybe we can also use the flags approach I already started with
MC13783_USE_TOUCHSCREEN which can be passed to the platform_data?

> generalize the driver so to handle multiple
> PMICs in one system (quite unlikely scenario?),

All functions take a struct mc13783 * so I think it should work with
multiple PMICs already.

> read actual pressure
> in TS driver.

This is left as an exercise for people who have the hardware which
supports this feature ;)

Sascha
Daniel Ribeiro Aug. 15, 2009, 1:17 a.m. UTC | #2
Em Ter, 2009-08-11 às 13:28 +0100, Mark Brown escreveu:
> > PMICs in one system (quite unlikely scenario?), read actual pressure
> 
> It's vanishingly unlikely that you'd see two Atlases in one system - you
> might see two PMICs but not two primary PMICs with stuff like battery
> chargers on them.

There are some GSM Phones from Motorola with PCAP2 + MC13883 (based on
MC13783, but with USB and regulator blocks only). On these phones the
battery charging, and USB OTG capabilities of PCAP2 are unused.

All "gen2" devices on http://wiki.openezx.org/Project_devices use PCAP2
+ MC13883. "MotoMAGX" devices use MC13783 only. And "gen1" PCAP2 only.