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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdb-zb3M4Rfo=DnSQvrO5q1qz8q91-X7ps1Ouyp_jou8pw@mail.gmail.com>
Date:	Tue, 13 Dec 2011 23:56:54 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Stephen Warren <swarren@...dia.com>
Cc:	Haojian Zhuang <haojian.zhuang@...il.com>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	Barry Song <21cnbao@...il.com>,
	Shawn Guo <shawn.guo@...escale.com>,
	Thomas Abraham <thomas.abraham@...aro.org>,
	Dong Aisheng <dong.aisheng@...aro.org>,
	Rajendra Nayak <rajendra.nayak@...aro.org>,
	Haojian Zhuang <haojian.zhuang@...vell.com>
Subject: Re: [PATCH v6] pinctrl: add a pin config interface

On Tue, Dec 13, 2011 at 10:49 PM, Stephen Warren <swarren@...dia.com> wrote:
> Haojian Zhuang wrote at Tuesday, December 13, 2011 12:22 AM:

>> Excuse me that I didn't find that patch. Did you merge it into your
>> git tree? The latest patch on pinconf.c is updating pdev->dev to
>> &pdev->dev.
>
> I just hit the same problem. This isn't what my patch addresses.
>
> My patch prevents the pinctrl core from creating a struct device for the
> pin controller, since it already has one.
>
> The problem that Haojian mentions is regarding struct pinctrl_dev, not
> plain device.

Aha, sorry guys I got it all wrong :-/

Yes as it stands now it can only be used from within the pin
control drivers and frameworks themselves, what good is
that...

> I'd suggest modifying all the pin_config_* APIs to take a device name
> rather than a "struct pinctrl_dev *". I'll work on a patch to do this,
> since I'm hitting the same problem.

It can use the struct device * for the pin controller or a device name,
either works fine I guess. But strings are nice, you tend to understand
them.

> An alternative may be to either:
>
> * Add function pinctrl_get_dev_by_name(name)
>
> Or:
>
> * Use dev = bus_find_device_by_name(name) to get the plain device, and
> add a pinctrl_find_dev_by_dev(dev).
>
> Either of those sound more complex though, but I suppose do allow
> direct operation if you somehow do already have the struct pinctrl_dev.

Nah, seems like opening a can of worms, let's keep
that stuff internal. A string is nice.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ