lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <569F3C45.7090109@atmel.com>
Date:	Wed, 20 Jan 2016 15:50:29 +0800
From:	"Yang, Wenyou" <wenyou.yang@...el.com>
To:	Peter Korsgaard <peter@...sgaard.com>
CC:	Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	"Ian Campbell" <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"Krzysztof Kozlowski" <k.kozlowski@...sung.com>,
	"Ferre, Nicolas" <Nicolas.FERRE@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Javier Martinez Canillas <javier@...hile0.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD
 driver

Hi Peter,

On 2016/1/20 15:40, Peter Korsgaard wrote:
>>>>>> "Yang," == Yang, Wenyou <Wenyou.Yang@...el.com> writes:
> Hi,
>
>>> But the charger driver can just as well do:
>   >>
>   >> dev_get_regmap(dev->parent);
>   >>
>   >> instead of:
>   >>
>   >> dev_get_drvdata(pdev->dev.parent)->regmap.
>
>   > For regulator, it works use the core do dev_get_regmap(dev->parent),
>   > but for charger, it need to export *act8945a.
>
> Why?

There is a callback (*get_property)(...), who will read the charger 
register via regmap,

but it doesn't provide the argument for regmap.

include/linux/power_supply.h

struct power_supply_desc {
         [ ... ]
         int (*get_property)(struct power_supply *psy,
                              enum power_supply_property psp,
                              union power_supply_propval *val);
         [ ... ]

}

>
> Just like the regulator core does, your battery driver can do:
>
> dev_get_regmap(dev->parent);
>

Best Regards,
Wenyou Yang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ