lkml.org 
[lkml]   [2019]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] base: soc: Handle custom soc information sysfs entries
On Tue, Oct 08, 2019 at 10:10:08AM -0700, mnalajal@codeaurora.org wrote:
> On 2019-10-08 08:43, Greg KH wrote:
> > On Tue, Oct 08, 2019 at 08:33:11AM -0700, Stephen Boyd wrote:
> > > Quoting Murali Nalajala (2019-10-07 13:37:42)
> > > > Soc framework exposed sysfs entries are not sufficient for some
> > > > of the h/w platforms. Currently there is no interface where soc
> > > > drivers can expose further information about their SoCs via soc
> > > > framework. This change address this limitation where clients can
> > > > pass their custom entries as attribute group and soc framework
> > > > would expose them as sysfs properties.
> > > >
> > > > Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
> > > > ---
> > >
> > > Reviewed-by: Stephen Boyd <swboyd@chromium.org>
> > >
> >
> > Nice, can we convert the existing soc drivers to use this interface
> > instead of the "export the device pointer" mess that they currently
> > have? That way we can drop that function entirely.
> >
> Thank you for the reviews.
> In the current linux tree i can find these driver instances who is using
> "soc_device_to_device" for populating their sysfs entries.
>
> drivers/soc/ux500/ux500-soc-id.c: parent =
> soc_device_to_device(soc_dev);
> drivers/soc/tegra/fuse/fuse-tegra.c: return soc_device_to_device(dev);
> drivers/soc/amlogic/meson-gx-socinfo.c: dev = soc_device_to_device(soc_dev);
> drivers/soc/amlogic/meson-mx-socinfo.c:
> dev_info(soc_device_to_device(soc_dev), "Amlogic %s %s detected\n",
> drivers/soc/imx/soc-imx8.c: ret =
> device_create_file(soc_device_to_device(soc_dev),
> drivers/soc/imx/soc-imx-scu.c: ret =
> device_create_file(soc_device_to_device(soc_dev),
> drivers/soc/versatile/soc-realview.c:
> device_create_file(soc_device_to_device(soc_dev), &realview_manf_attr);
> drivers/soc/versatile/soc-realview.c:
> device_create_file(soc_device_to_device(soc_dev), &realview_board_attr);
> drivers/soc/versatile/soc-realview.c:
> device_create_file(soc_device_to_device(soc_dev), &realview_arch_attr);
> drivers/soc/versatile/soc-realview.c:
> device_create_file(soc_device_to_device(soc_dev), &realview_build_attr);
> drivers/soc/versatile/soc-integrator.c: dev = soc_device_to_device(soc_dev);
>
> These drivers can use the current proposed approach to expose their sysfs
> entries.
> Will try to address these and submit. But i can't able to test these changes
> because i do not have these h/w's

Build testing should be sufficient.

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-10-08 19:18    [W:0.056 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site