linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reset: improve of_xlate documentation
@ 2019-10-22 16:30 Philipp Zabel
  2019-10-22 19:01 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2019-10-22 16:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernel

Mention of_reset_simple_xlate as the default if of_xlate is not set.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/reset/core.c             | 6 ++++--
 include/linux/reset-controller.h | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 660e0b07feca..3066f12f70db 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -77,8 +77,10 @@ static const char *rcdev_name(struct reset_controller_dev *rcdev)
  * @rcdev: a pointer to the reset controller device
  * @reset_spec: reset line specifier as found in the device tree
  *
- * This simple translation function should be used for reset controllers
- * with 1:1 mapping, where reset lines can be indexed by number without gaps.
+ * This static translation function is be used by default if of_xlate in
+ * :c:type:`reset_controller_dev` is not set. It is useful for all reset
+ * controllers with 1:1 mapping, where reset lines can be indexed by number
+ * without gaps.
  */
 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
 			  const struct of_phandle_args *reset_spec)
diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
index 984f625d5593..c53626c07e87 100644
--- a/include/linux/reset-controller.h
+++ b/include/linux/reset-controller.h
@@ -62,7 +62,8 @@ struct reset_control_lookup {
  * @of_node: corresponding device tree node as phandle target
  * @of_reset_n_cells: number of cells in reset line specifiers
  * @of_xlate: translation function to translate from specifier as found in the
- *            device tree to id as given to the reset control ops
+ *            device tree to id as given to the reset control ops, defaults
+ *            to :c:func:`of_reset_simple_xlate`.
  * @nr_resets: number of reset controls in this reset controller device
  */
 struct reset_controller_dev {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] reset: improve of_xlate documentation
  2019-10-22 16:30 [PATCH] reset: improve of_xlate documentation Philipp Zabel
@ 2019-10-22 19:01 ` Randy Dunlap
  2019-10-24  8:52   ` Philipp Zabel
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2019-10-22 19:01 UTC (permalink / raw)
  To: Philipp Zabel, linux-kernel; +Cc: kernel

Hi,
minor fix below:

On 10/22/19 9:30 AM, Philipp Zabel wrote:
> Mention of_reset_simple_xlate as the default if of_xlate is not set.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  drivers/reset/core.c             | 6 ++++--
>  include/linux/reset-controller.h | 3 ++-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> index 660e0b07feca..3066f12f70db 100644
> --- a/drivers/reset/core.c
> +++ b/drivers/reset/core.c
> @@ -77,8 +77,10 @@ static const char *rcdev_name(struct reset_controller_dev *rcdev)
>   * @rcdev: a pointer to the reset controller device
>   * @reset_spec: reset line specifier as found in the device tree
>   *
> - * This simple translation function should be used for reset controllers
> - * with 1:1 mapping, where reset lines can be indexed by number without gaps.
> + * This static translation function is be used by default if of_xlate in

                              function is used by default

> + * :c:type:`reset_controller_dev` is not set. It is useful for all reset
> + * controllers with 1:1 mapping, where reset lines can be indexed by number
> + * without gaps.
>   */
>  static int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
>  			  const struct of_phandle_args *reset_spec)
> diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
> index 984f625d5593..c53626c07e87 100644
> --- a/include/linux/reset-controller.h
> +++ b/include/linux/reset-controller.h
> @@ -62,7 +62,8 @@ struct reset_control_lookup {
>   * @of_node: corresponding device tree node as phandle target
>   * @of_reset_n_cells: number of cells in reset line specifiers
>   * @of_xlate: translation function to translate from specifier as found in the
> - *            device tree to id as given to the reset control ops
> + *            device tree to id as given to the reset control ops, defaults
> + *            to :c:func:`of_reset_simple_xlate`.
>   * @nr_resets: number of reset controls in this reset controller device
>   */
>  struct reset_controller_dev {
> 


-- 
~Randy
Reported-by: Randy Dunlap <rdunlap@infradead.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] reset: improve of_xlate documentation
  2019-10-22 19:01 ` Randy Dunlap
@ 2019-10-24  8:52   ` Philipp Zabel
  0 siblings, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2019-10-24  8:52 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel; +Cc: kernel

Hi Randy,

On Tue, 2019-10-22 at 12:01 -0700, Randy Dunlap wrote:
> Hi,
> minor fix below:
> 
> On 10/22/19 9:30 AM, Philipp Zabel wrote:
> > Mention of_reset_simple_xlate as the default if of_xlate is not set.
> > 
> > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> > ---
> >  drivers/reset/core.c             | 6 ++++--
> >  include/linux/reset-controller.h | 3 ++-
> >  2 files changed, 6 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> > index 660e0b07feca..3066f12f70db 100644
> > --- a/drivers/reset/core.c
> > +++ b/drivers/reset/core.c
> > @@ -77,8 +77,10 @@ static const char *rcdev_name(struct reset_controller_dev *rcdev)
> >   * @rcdev: a pointer to the reset controller device
> >   * @reset_spec: reset line specifier as found in the device tree
> >   *
> > - * This simple translation function should be used for reset controllers
> > - * with 1:1 mapping, where reset lines can be indexed by number without gaps.
> > + * This static translation function is be used by default if of_xlate in
> 
>                               function is used by default

Thank you, fixed up and applied to reset/next.

regards
Philipp


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-24  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 16:30 [PATCH] reset: improve of_xlate documentation Philipp Zabel
2019-10-22 19:01 ` Randy Dunlap
2019-10-24  8:52   ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).