lkml.org 
[lkml]   [2022]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/7] device property: add fwnode_property_read_string_index()
Le Wed, 23 Mar 2022 13:34:07 +0200,
Sakari Ailus <sakari.ailus@linux.intel.com> a écrit :

> > * @get_parent: Return the parent of an fwnode.
> > @@ -123,6 +126,9 @@ struct fwnode_operations {
> > (*property_read_string_array)(const struct fwnode_handle *fwnode_handle,
> > const char *propname, const char **val,
> > size_t nval);
> > + int (*property_read_string_index)(const struct fwnode_handle *fwnode,
> > + const char *propname, int index,
> > + const char **string);
>
> Could this instead be done by adding an index argument to the
> property_read_string_array?

Hi Sakari,

I guess I could do that. Do you expect the string pointer to be
returned in "val" ? Guess a -1 index would mean that we don't care
about the index but want the array to be returned. And if index is
specified, nval will be ignored.

>
> The ACPI case is a bit more work but it guess it could be implemented later
> as part of a more general cleanup there.

--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com

\
 
 \ /
  Last update: 2022-03-23 12:41    [W:0.052 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site