public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/5] mfd: max14577: Add max14577 MFD driver core
Date: Fri, 22 Nov 2013 09:31:18 +0000	[thread overview]
Message-ID: <20131122093118.GH23067@lee--X1> (raw)
In-Reply-To: <1385109972-28059-2-git-send-email-k.kozlowski@samsung.com>

On Fri, 22 Nov 2013, Krzysztof Kozlowski wrote:

> From: Chanwoo Choi <cw00.choi@samsung.com>
> 
> This patch adds max14577 core/irq driver to support MUIC(Micro USB IC)
> device and charger device and support irq domain method to control
> internal interrupt of max14577 device. Also, this patch supports DT
> binding with max14577_i2c_parse_dt().
> 
> The MAXIM 14577 chip contains Micro-USB Interface Circuit and Li+ Battery
> Charger. It contains accessory and USB charger detection logic. It supports
> USB 2.0 Hi-Speed, UART and stereo audio signals over Micro-USB connector.
> 
> The battery charger is compliant with the USB Battery Charging Specification
> Revision 1.1. It has also SFOUT LDO output for powering USB devices.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/mfd/Kconfig                  |   13 ++
>  drivers/mfd/Makefile                 |    1 +
>  drivers/mfd/max14577.c               |  241 +++++++++++++++++++++++++
>  include/linux/mfd/max14577-private.h |  324 ++++++++++++++++++++++++++++++++++
>  include/linux/mfd/max14577.h         |   70 ++++++++
>  5 files changed, 649 insertions(+)
>  create mode 100644 drivers/mfd/max14577.c
>  create mode 100644 include/linux/mfd/max14577-private.h
>  create mode 100644 include/linux/mfd/max14577.h

<snip>

> +static struct mfd_cell max14577_devs[] = {
> +	{ .name = "max14577-muic", },
> +	{ .name = "max14577-regulator", },
> +	{ .name = "max14577-charger", },
> +};

If these all support device tree, shouldn't you be populating
max14577_devs[x].of_compatible too? That way the MFD core will
automatically setup your dev.of_node pointers for you?

<snip>

> +	max14577->vendor_id = (reg_data & 0x7);
> +	max14577->device_id = ((reg_data & 0xF8) >> 0x3);

I'm not too keen on these magic numbers, can you create #defines for
them please? If there are any other interesting address, it might be
worth creating some for those too.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2013-11-22  9:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22  8:46 [PATCH v3 0/5] mfd: max14577: Add max14577 MFD drivers Krzysztof Kozlowski
2013-11-22  8:46 ` [PATCH v3 1/5] mfd: max14577: Add max14577 MFD driver core Krzysztof Kozlowski
2013-11-22  9:31   ` Lee Jones [this message]
2013-11-22  9:58     ` Krzysztof Kozlowski
2013-11-22 10:07       ` Lee Jones
2013-11-22 10:36   ` Mark Brown
2013-11-22  8:46 ` [PATCH v3 2/5] extcon: max14577: Add extcon-max14577 driver to support MUIC device Krzysztof Kozlowski
2013-11-22 10:35   ` Mark Brown
2013-11-22 11:34     ` Krzysztof Kozlowski
2013-11-22  8:46 ` [PATCH v3 3/5] charger: max14577: Add charger support for Maxim 14577 Krzysztof Kozlowski
2013-11-22  8:54   ` Alexander Shiyan
2013-11-22  9:57     ` Krzysztof Kozlowski
2013-11-22  8:46 ` [PATCH v3 4/5] regulator: max14577: Add regulator driver " Krzysztof Kozlowski
2013-11-22  9:16   ` Lee Jones
2013-11-22  9:23     ` Krzysztof Kozlowski
2013-11-22 10:15   ` Lee Jones
2013-11-22 15:55     ` Krzysztof Kozlowski
2013-11-22 13:00   ` Bartlomiej Zolnierkiewicz
2013-11-22  8:46 ` [PATCH v3 5/5] mfd: max14577: Add device tree bindings document Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131122093118.GH23067@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox