All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Milo Kim <milo.kim@ti.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] power:lp8727_charger: use the private data instead of updating I2C device platform data
Date: Tue, 22 Sep 2015 15:14:49 +0200	[thread overview]
Message-ID: <20150922131448.GC23334@earth> (raw)
In-Reply-To: <1440482828-7004-1-git-send-email-milo.kim@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

Hi,

On Tue, Aug 25, 2015 at 03:07:07PM +0900, Milo Kim wrote:
> Currently, lp8727 charger driver parses the DT and copies values into the
> 'cl->dev.platform_data' if 'of_node' exists.
> This may have architectural issue. Platform data is configurable through
> the DT or I2C board info inside the platform area.
> However, lp8727 driver changes this configuration when it is loaded.
> 
> The driver should get data from the platform side and use the private
> data, 'lp8727_chg->pdata' instead of changing the original platform data.
> 
> _probe() procedure is changed as follows.
>   1. lp8727_parse_dt() returns the pointer of lp8727_platform_data.
>      The driver uses this allocated platform data. So it should keep
>      original platform data, 'dev->platform_data'.
>   2. In _probe(), check the return value of lp8727_parse_dt().
>      If an error is found, then exit as PTR_ERR(pdata).
>   3. If 'of_node' is not found, then the driver just gets the platform data
>      from the I2C device structure.
>   4. Map the platform data to private data structure.

Thanks, I queued both patches.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2015-09-22 13:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25  6:07 [PATCH 1/2] power:lp8727_charger: use the private data instead of updating I2C device platform data Milo Kim
2015-08-25  6:07 ` Milo Kim
2015-08-25  6:07 ` [PATCH 2/2] power:lp8727_charger: parsing child node after getting debounce-ms Milo Kim
2015-08-25  6:07   ` Milo Kim
2015-09-22 13:14 ` Sebastian Reichel [this message]

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=20150922131448.GC23334@earth \
    --to=sre@kernel.org \
    --cc=dbaryshkov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=milo.kim@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.