Re: [RFC PATCHv2 1/4] drivers/otp: add initial support for OTP memory

From: Greg KH
Date: Fri Mar 25 2011 - 17:16:24 EST


On Fri, Mar 25, 2011 at 09:12:22PM +0100, Arnd Bergmann wrote:
> On Thursday 24 March 2011 16:21:08 Jamie Iles wrote:
> > OTP memory is typically found in some embedded devices and can be
> > used for storing boot code, cryptographic keys and other persistent
> > information onchip. This patch adds a generic layer that devices can
> > register OTP with and allows access through a set of character
> > device nodes.
>
> Looks very nice overall, but I have a few minor comments.
>
> > diff --git a/Documentation/ABI/testing/sysfs-bus-otp b/Documentation/ABI/testing/sysfs-bus-otp
> > new file mode 100644
> > index 0000000..4dbc652
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-bus-otp
> > @@ -0,0 +1,68 @@
> > +What: /sys/bus/otp/
> > +Date: March 2011
> > +KernelVersion: 2.6.40+
> > +Contact: Jamie Iles <jamie@xxxxxxxxxxxxx>
> > +Description:
> > + The otp bus presents a number of devices where each
> > + device represents a region or device in the SoC. Each region
> > + will create a device node which allows the region to be
> > + written with read()/write() calls and the device on the bus
> > + has attributes for controlling the redundancy format and
> > + getting the region size.
>
> Why is this a bus? You don't have any device matching code or similar,
> and the devices typically are on an existing bus_type (e.g. platform_bus).
> I think it would make more sense to do this as a class.

No, for new things, we want to use busses instead of classes please.
Especially as this does create devices, which are best put on a bus
somewhere.

thanks,

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