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


Groups > linux.kernel > #1664714

Re: [PATCH v15 2/7] power: add power sequence library

From Ulf Hansson <ulf.hansson@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v15 2/7] power: add power sequence library
Date 2017-06-13 12:30 +0200
Message-ID <tRRfb-6Mo-3@gated-at.bofh.it> (permalink)
References <tRRfb-6Mo-5@gated-at.bofh.it> <tRRfb-6Mo-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[...]

> +
> +/**
> + * of_pwrseq_on - Carry out power sequence on for device node
> + *
> + * @np: the device node would like to power on
> + *
> + * Carry out a single device power on.  If multiple devices
> + * need to be handled, use of_pwrseq_on_list() instead.
> + *
> + * Return a pointer to the power sequence instance on success,
> + * or an error code otherwise.
> + */
> +struct pwrseq *of_pwrseq_on(struct device_node *np)
> +{
> +       struct pwrseq *pwrseq;
> +       int ret;
> +
> +       pwrseq = pwrseq_find_available_instance(np);
> +       if (!pwrseq)
> +               return ERR_PTR(-ENOENT);

In case the pwrseq instance hasn't been registered yet, then there is
no way to deal with -EPROBE_DEFER properly here.

I haven't been following the discussions in-depth during all
iterations, so perhaps you have already discussed why doing it like
this.

Anyway, that means all pwrseq instances needs to be registered an
early boot level, to be safe. To me, that seems like poor design
choice.

[...]

Otherwise I think this looks okay to me.

Kind regards
Uffe

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v15 2/7] power: add power sequence library Ulf Hansson <ulf.hansson@linaro.org> - 2017-06-13 12:30 +0200
  Re: [PATCH v15 2/7] power: add power sequence library Ulf Hansson <ulf.hansson@linaro.org> - 2017-06-14 11:00 +0200
    Re: [PATCH v15 2/7] power: add power sequence library Ulf Hansson <ulf.hansson@linaro.org> - 2017-06-15 10:20 +0200
      Re: [PATCH v15 2/7] power: add power sequence library Ulf Hansson <ulf.hansson@linaro.org> - 2017-06-15 11:40 +0200
        Re: [PATCH v15 2/7] power: add power sequence library Ulf Hansson <ulf.hansson@linaro.org> - 2017-06-19 10:20 +0200
          Re: [PATCH v15 2/7] power: add power sequence library Ulf Hansson <ulf.hansson@linaro.org> - 2017-06-19 11:50 +0200

csiph-web