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


Groups > linux.kernel > #1370607 > unrolled thread

RE: [RFC PATCH 2/4] pinctrl: pinconf-generic: Add ACPI support

Started by"Tirdea, Irina" <irina.tirdea@intel.com>
First post2016-04-04 15:10 +0200
Last post2016-04-04 15:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [RFC PATCH 2/4] pinctrl: pinconf-generic: Add ACPI support "Tirdea, Irina" <irina.tirdea@intel.com> - 2016-04-04 15:10 +0200

#1370607 — RE: [RFC PATCH 2/4] pinctrl: pinconf-generic: Add ACPI support

From"Tirdea, Irina" <irina.tirdea@intel.com>
Date2016-04-04 15:10 +0200
SubjectRE: [RFC PATCH 2/4] pinctrl: pinconf-generic: Add ACPI support
Message-ID<rkcqu-3rR-17@gated-at.bofh.it>

> -----Original Message-----
> From: Andy Shevchenko [mailto:andriy.shevchenko@linux.intel.com]
> Sent: 01 April, 2016 17:05
> To: Tirdea, Irina; Rafael J. Wysocki; Len Brown; Mika Westerberg; Linus Walleij; linux-gpio@vger.kernel.org; linux-
> acpi@vger.kernel.org
> Cc: Rob Herring; Heikki Krogerus; Purdila, Octavian; Ciocan, Cristina; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [RFC PATCH 2/4] pinctrl: pinconf-generic: Add ACPI support
> 
> On Thu, 2016-03-31 at 14:44 +0300, Irina Tirdea wrote:
> > Add ACPI support for the generic device tree properties.
> > Convert the pinconf generic code to handle both ACPI and
> > device tree by using the fwnode_property API. Also include
> > renaming device tree references in names of functions and
> > structures from 'dt' to 'fwnode'.
> 
> This is looks good to me, though few style / minor comments below.

Thanks for the review, Andy! 
> 
> > --- a/drivers/pinctrl/pinconf-generic.c
> > +++ b/drivers/pinctrl/pinconf-generic.c
> >
> 
> > @@ -175,22 +176,22 @@ static const struct pinconf_generic_params
> > dt_params[] = {
> >  };
> >
> >  /**
> > - * parse_dt_cfg() - Parse DT pinconf parameters
> > - * @np:	DT node
> > + * parse_fwnode_cfg() - Parse FW pinconf parameters
> > + * @fw:	FW node
> 
> Here and below it should be @fwnode.
OK.
> 
> > -int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
> > -		struct device_node *np, struct pinctrl_map **map,
> > +static int pinconf_generic_fwnode_subnode_to_map(struct pinctrl_dev
> > *pctldev,
> > +		struct fwnode_handle *fwnode, struct pinctrl_map
> > **map,
> >  		unsigned *reserved_maps, unsigned *num_maps,
> >  		enum pinctrl_map_type type)
> >  {
> > -	int ret;
> > +	int ret, i;
> 
> Since you change this line anyway, perhaps move it to be last in the
> definition block?
> 
> >  	const char *function;
> >  	struct device *dev = pctldev->dev;
> >  	unsigned long *configs = NULL;
> >  	unsigned num_configs = 0;
> >  	unsigned reserve, strings_count;
> > -	struct property *prop;
> > -	const char *group;
> > +	const char **groups;
> >  	const char *subnode_target_type = "pins";
> 
> ...to here.
> 
Sure.
> > +#ifdef CONFIG_OF
> > +inline int pinconf_generic_parse_dt_config(struct device_node *np,
> > +					   struct pinctrl_dev
> > *pctldev,
> > +					   unsigned long **configs,
> > +					   unsigned int *nconfigs)
> > +{
> > +	return pinconf_generic_parse_fwnode_config(&np->fwnode,
> > pctldev,
> > +						   configs,
> > nconfigs);
> > +}
> 
> I didn't see any user of this.

pinconf_generic_parse_dt_config  is defined in drivers/pinctrl/pinconf.h
and is used by various pinctrl drivers(e.g.: drivers/pinctrl/nomadik/pinctrl-abx500.c,
drivers/pinctrl/pinctrl-tz1090-pdc.c, drivers/pinctrl/pinctrl-tz1090.c). Taking a closer
look at its prototype, I should match it here exactly (by removing inline).

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web