Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1337034 > unrolled thread

Re: [PATCH 1/1] of/overlay: of overlay callbacks

Started byMoritz Fischer <moritz.fischer@ettus.com>
First post2016-02-18 06:20 +0100
Last post2016-02-18 06:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/1] of/overlay: of overlay callbacks Moritz Fischer <moritz.fischer@ettus.com> - 2016-02-18 06:20 +0100

#1337034 — Re: [PATCH 1/1] of/overlay: of overlay callbacks

FromMoritz Fischer <moritz.fischer@ettus.com>
Date2016-02-18 06:20 +0100
SubjectRe: [PATCH 1/1] of/overlay: of overlay callbacks
Message-ID<r3pap-EO-11@gated-at.bofh.it>
Hi Alan,

a couple of nits below.

On Wed, Feb 17, 2016 at 9:41 AM, Alan Tull <atull@opensource.altera.com> wrote:

>
> +/*
> + * Send overlay callbacks to handlers that match.  This call is blocking.  In
Can we make this 'Invoke' instead of send?

> @@ -370,6 +448,13 @@ int of_overlay_create(struct device_node *tree)
>                 goto err_free_idr;
>         }
>
> +       err = send_overlay_callbacks(ov, OF_OVERLAY_PRE_APPLY);

Again ... maybe invoke ;-)

> +       if (err < 0) {
> +               pr_err("%s: Pre apply handler failed (err=%d)\n",
> +                      __func__, err);
> +               goto err_free_idr;
> +       }
> +
>         /* apply the overlay */
>         err = of_overlay_apply(ov);
>         if (err) {
> @@ -389,6 +474,8 @@ int of_overlay_create(struct device_node *tree)
>         /* add to the tail of the overlay list */
>         list_add_tail(&ov->node, &ov_list);
>
> +       send_overlay_callbacks(ov, OF_OVERLAY_POST_APPLY);

And again :)

> diff --git a/include/linux/of.h b/include/linux/of.h
> index dc6e396..def9481 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -101,9 +101,33 @@ static inline int of_node_is_attached(struct device_node *node)
>         return node && node->kobj.state_in_sysfs;
>  }
>
> +/* Callback types */
> +#define OF_OVERLAY_PRE_APPLY   (0)
> +#define OF_OVERLAY_POST_APPLY  (1)
> +#define OF_OVERLAY_PRE_REMOVE  (2)
> +#define OF_OVERLAY_POST_REMOVE (3)

Can we make this an enum?

Cheers,

Moritz

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web