Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1309954

RE: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver

From "Yang, Wenyou" <Wenyou.Yang@atmel.com>
Newsgroups linux.kernel
Subject RE: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver
Date 2016-01-15 09:40 +0100
Message-ID <qR85l-3wp-23@gated-at.bofh.it> (permalink)
References <qQIkz-29Y-11@gated-at.bofh.it> <qQIkz-29Y-19@gated-at.bofh.it> <qQQi6-7IK-11@gated-at.bofh.it> <qR1dw-76Q-5@gated-at.bofh.it> <qR7sC-2Y8-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Peter,

> -----Original Message-----
> From: Peter Korsgaard [mailto:jacmet@gmail.com] On Behalf Of Peter Korsgaard
> Sent: 2016年1月15日 15:58
> To: Yang, Wenyou <Wenyou.Yang@atmel.com>
> Cc: Lee Jones <lee.jones@linaro.org>; Rob Herring <robh+dt@kernel.org>;
> Pawel Moll <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian
> Campbell <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>;
> devicetree@vger.kernel.org; Krzysztof Kozlowski <k.kozlowski@samsung.com>;
> Ferre, Nicolas <Nicolas.FERRE@atmel.com>; linux-kernel@vger.kernel.org;
> Javier Martinez Canillas <javier@dowhile0.org>; linux-arm-
> kernel@lists.infradead.org
> Subject: Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC
> MFD driver
> 
> >>>>> "Yang," == Yang, Wenyou <Wenyou.Yang@atmel.com> writes:
> 
> Hi,
> 
>  >> Why not make it a tristate instead? Having regulators as modules is perhaps
> not a  >> very wise thing to do, but conceptually I don't see why this code couldn't
> be a  >> module.
> 
>  > Yes, you are right. it can be use a tristate.
> 
> Ok, good.
> 
> >> > +	act8945a = devm_kzalloc(&i2c->dev, sizeof(*act8945a),
> >> > +GFP_KERNEL);
>  >> > +	if (!act8945a)
>  >> > +		return -ENOMEM;
>  >> > +
>  >>
>  >> What is the point of this structure (and the header file)? Can't the subdevices
> just  >> do dev_get_regmap(dev->parent)? regulator_register() afaik already does
> this by  >> default.
> 
>  > Yes, I re-read regulator_register() code. It did do dev_get_regmap(dev-
> >parent).
> 
>  > I think this structure should be pointed by dev->parent, this structure is
> necessary.
> 
>  > Yes regulator driver should be simpler.
> 
>  > Moreover, it is used by another sub device, charger. Which don't such code.
> 
> But the charger driver can just as well do:
> 
> dev_get_regmap(dev->parent);
> 
> instead of:
> 
> dev_get_drvdata(pdev->dev.parent)->regmap.

Understand. 

Thank you!


Best Regards,
Wenyou Yang

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver Wenyou Yang <wenyou.yang@atmel.com> - 2016-01-14 06:10 +0100
  Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver Peter Korsgaard <peter@korsgaard.com> - 2016-01-14 14:40 +0100
    RE: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD  driver "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-01-15 02:20 +0100
      Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver Peter Korsgaard <peter@korsgaard.com> - 2016-01-15 09:00 +0100
        RE: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD  driver "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-01-15 09:40 +0100
        RE: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD  driver "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-01-20 08:30 +0100
          Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver Peter Korsgaard <peter@korsgaard.com> - 2016-01-20 08:50 +0100
            Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD  driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-20 09:00 +0100
            Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD  driver "Yang, Wenyou" <wenyou.yang@atmel.com> - 2016-01-20 09:00 +0100

csiph-web