diff mbox series

[RESEND,v6,05/11] mfd: core: document mfd_add_devices()

Message ID 20190318174228.18194-6-brgl@bgdev.pl (mailing list archive)
State Superseded
Headers show
Series mfd: add support for max77650 PMIC | expand

Commit Message

Bartosz Golaszewski March 18, 2019, 5:42 p.m. UTC
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Add a kernel doc for mfd_add_devices().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/mfd/mfd-core.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Pavel Machek March 22, 2019, 9:10 a.m. UTC | #1
On Mon 2019-03-18 18:42:22, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Add a kernel doc for mfd_add_devices().
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Acked-by: Pavel Machek <pavel@ucw.cz>
Lee Jones April 2, 2019, 7:41 a.m. UTC | #2
On Mon, 18 Mar 2019, Bartosz Golaszewski wrote:

> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Add a kernel doc for mfd_add_devices().
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  drivers/mfd/mfd-core.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> index 94e3f32ce935..0898a8db1747 100644
> --- a/drivers/mfd/mfd-core.c
> +++ b/drivers/mfd/mfd-core.c
> @@ -269,6 +269,20 @@ static int mfd_add_device(struct device *parent, int id,
>  	return ret;
>  }
>  
> +/**
> + * mfd_add_devices - register a set of child devices

"register child devices"

> + *
> + * @parent: Parent device for all sub-nodes.
> + * @id: Platform device id. If >= 0, each sub-device will have its cell_id
> + *      added to this number and use it as the platform device id.
> + * @cells: Array of mfd cells describing sub-devices.
> + * @n_devs: Number of sub-devices to register.
> + * @mem_base: Parent register range resource for sub-devices.
> + * @irq_base: Base of the range of virtual interrupt numbers allocated for
> + *            this MFD device. Unused if @domain is specified.
> + * @domain: Interrupt domain used to create mappings for HW interrupt numbers
> + *          specificed in sub-devices' IRQ resources.

Spelling.

> + */
>  int mfd_add_devices(struct device *parent, int id,
>  		    const struct mfd_cell *cells, int n_devs,
>  		    struct resource *mem_base,

How about this:

/**
 * mfd_add_devices - register child devices
 *
 * @parent:	Pointer to parent device.
 * @id:		Can be PLATFORM_DEVID_AUTO to let the Platform API take care
 * 		of device numbering, or will be added to a device's cell_id.
 * @cells:	Array of (struct mfd_cell)s describing child devices.
 * @n_devs:	Number of child devices to register.
 * @mem_base:	Parent register range resource for child devices.
 * @irq_base:	Base of the range of virtual interrupt numbers allocated for
 * 		this MFD device. Unused if @domain is specified.
 * @domain:	Interrupt domain to create mappings for hardware interrupts.
 */
Bartosz Golaszewski April 2, 2019, 8:08 a.m. UTC | #3
wt., 2 kwi 2019 o 09:41 Lee Jones <lee.jones@linaro.org> napisaƂ(a):
>
> On Mon, 18 Mar 2019, Bartosz Golaszewski wrote:
>
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > Add a kernel doc for mfd_add_devices().
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > ---
> >  drivers/mfd/mfd-core.c | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> > index 94e3f32ce935..0898a8db1747 100644
> > --- a/drivers/mfd/mfd-core.c
> > +++ b/drivers/mfd/mfd-core.c
> > @@ -269,6 +269,20 @@ static int mfd_add_device(struct device *parent, int id,
> >       return ret;
> >  }
> >
> > +/**
> > + * mfd_add_devices - register a set of child devices
>
> "register child devices"
>
> > + *
> > + * @parent: Parent device for all sub-nodes.
> > + * @id: Platform device id. If >= 0, each sub-device will have its cell_id
> > + *      added to this number and use it as the platform device id.
> > + * @cells: Array of mfd cells describing sub-devices.
> > + * @n_devs: Number of sub-devices to register.
> > + * @mem_base: Parent register range resource for sub-devices.
> > + * @irq_base: Base of the range of virtual interrupt numbers allocated for
> > + *            this MFD device. Unused if @domain is specified.
> > + * @domain: Interrupt domain used to create mappings for HW interrupt numbers
> > + *          specificed in sub-devices' IRQ resources.
>
> Spelling.
>
> > + */
> >  int mfd_add_devices(struct device *parent, int id,
> >                   const struct mfd_cell *cells, int n_devs,
> >                   struct resource *mem_base,
>
> How about this:
>
> /**
>  * mfd_add_devices - register child devices
>  *
>  * @parent:     Pointer to parent device.
>  * @id:         Can be PLATFORM_DEVID_AUTO to let the Platform API take care
>  *              of device numbering, or will be added to a device's cell_id.
>  * @cells:      Array of (struct mfd_cell)s describing child devices.
>  * @n_devs:     Number of child devices to register.
>  * @mem_base:   Parent register range resource for child devices.
>  * @irq_base:   Base of the range of virtual interrupt numbers allocated for
>  *              this MFD device. Unused if @domain is specified.
>  * @domain:     Interrupt domain to create mappings for hardware interrupts.
>  */
>

Sure, looks good to me.

FYI the latest version of this series is v7, but the mfd driver didn't
change since v6.

Bart
diff mbox series

Patch

diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 94e3f32ce935..0898a8db1747 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -269,6 +269,20 @@  static int mfd_add_device(struct device *parent, int id,
 	return ret;
 }
 
+/**
+ * mfd_add_devices - register a set of child devices
+ *
+ * @parent: Parent device for all sub-nodes.
+ * @id: Platform device id. If >= 0, each sub-device will have its cell_id
+ *      added to this number and use it as the platform device id.
+ * @cells: Array of mfd cells describing sub-devices.
+ * @n_devs: Number of sub-devices to register.
+ * @mem_base: Parent register range resource for sub-devices.
+ * @irq_base: Base of the range of virtual interrupt numbers allocated for
+ *            this MFD device. Unused if @domain is specified.
+ * @domain: Interrupt domain used to create mappings for HW interrupt numbers
+ *          specificed in sub-devices' IRQ resources.
+ */
 int mfd_add_devices(struct device *parent, int id,
 		    const struct mfd_cell *cells, int n_devs,
 		    struct resource *mem_base,