From: Marco Felsch <m.felsch@pengutronix.de> To: Sakari Ailus <sakari.ailus@iki.fi> Cc: Robert Foss <robert.foss@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Maxime Ripard <maxime@cerno.tech>, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dongchun Zhu <dongchun.zhu@mediatek.com>, Fabio Estevam <festevam@gmail.com>, Tomasz Figa <tfiga@chromium.org> Subject: Re: [PATCH v6 2/3] media: ov8856: Add devicetree support Date: Thu, 30 Apr 2020 12:11:57 +0200 [thread overview] Message-ID: <20200430101157.GD2188@pengutronix.de> (raw) In-Reply-To: <20200430095907.GG867@valkosipuli.retiisi.org.uk> On 20-04-30 12:59, Sakari Ailus wrote: > Hi Marco, > > On Thu, Apr 30, 2020 at 11:53:32AM +0200, Marco Felsch wrote: > > Hi Sakari, > > > > On 20-04-30 12:45, Sakari Ailus wrote: > > > Hi Marco, > > > > > > On Thu, Apr 30, 2020 at 11:35:24AM +0200, Marco Felsch wrote: ... > > > > > - if (mclk != OV8856_MCLK) { > > > > > - dev_err(dev, "external clock %d is not supported", mclk); > > > > > - return -EINVAL; > > > > > + if (!is_acpi_node(fwnode)) { > > > > > + ov8856->xvclk = devm_clk_get(dev, "xvclk"); > > > > > + if (IS_ERR(ov8856->xvclk)) { > > > > > + dev_err(dev, "could not get xvclk clock (%pe)\n", > > > > > + ov8856->xvclk); > > > > > + return PTR_ERR(ov8856->xvclk); > > > > > + } > > > > > + > > > > > + clk_set_rate(ov8856->xvclk, xvclk_rate); > > > > > + xvclk_rate = clk_get_rate(ov8856->xvclk); > > > > > } > > > > > > > > Why do we handle the clock only in DT case? Is there a problem with the > > > > clock handling and ACPI? > > > > > > Not really, it's just that ACPI does not provide an interface to the clocks > > > as such. > > > > But you will get a clk by devm_clk_get()? > > No, because ACPI does not expose one to drivers. Effectively the entire > power sequences are implemented in ACPI, not in the driver. > Ah okay, thanks for the explanation. I'm really not into the ACPI stuff.. So this means the __power_off / power_on should only be done if we are using DT's? Regards, Marco
WARNING: multiple messages have this Message-ID (diff)
From: Marco Felsch <m.felsch@pengutronix.de> To: Sakari Ailus <sakari.ailus@iki.fi> Cc: devicetree@vger.kernel.org, Dongchun Zhu <dongchun.zhu@mediatek.com>, linux-kernel@vger.kernel.org, Robert Foss <robert.foss@linaro.org>, Tomasz Figa <tfiga@chromium.org>, Maxime Ripard <maxime@cerno.tech>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Fabio Estevam <festevam@gmail.com>, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: Re: [PATCH v6 2/3] media: ov8856: Add devicetree support Date: Thu, 30 Apr 2020 12:11:57 +0200 [thread overview] Message-ID: <20200430101157.GD2188@pengutronix.de> (raw) In-Reply-To: <20200430095907.GG867@valkosipuli.retiisi.org.uk> On 20-04-30 12:59, Sakari Ailus wrote: > Hi Marco, > > On Thu, Apr 30, 2020 at 11:53:32AM +0200, Marco Felsch wrote: > > Hi Sakari, > > > > On 20-04-30 12:45, Sakari Ailus wrote: > > > Hi Marco, > > > > > > On Thu, Apr 30, 2020 at 11:35:24AM +0200, Marco Felsch wrote: ... > > > > > - if (mclk != OV8856_MCLK) { > > > > > - dev_err(dev, "external clock %d is not supported", mclk); > > > > > - return -EINVAL; > > > > > + if (!is_acpi_node(fwnode)) { > > > > > + ov8856->xvclk = devm_clk_get(dev, "xvclk"); > > > > > + if (IS_ERR(ov8856->xvclk)) { > > > > > + dev_err(dev, "could not get xvclk clock (%pe)\n", > > > > > + ov8856->xvclk); > > > > > + return PTR_ERR(ov8856->xvclk); > > > > > + } > > > > > + > > > > > + clk_set_rate(ov8856->xvclk, xvclk_rate); > > > > > + xvclk_rate = clk_get_rate(ov8856->xvclk); > > > > > } > > > > > > > > Why do we handle the clock only in DT case? Is there a problem with the > > > > clock handling and ACPI? > > > > > > Not really, it's just that ACPI does not provide an interface to the clocks > > > as such. > > > > But you will get a clk by devm_clk_get()? > > No, because ACPI does not expose one to drivers. Effectively the entire > power sequences are implemented in ACPI, not in the driver. > Ah okay, thanks for the explanation. I'm really not into the ACPI stuff.. So this means the __power_off / power_on should only be done if we are using DT's? Regards, Marco _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-30 10:12 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-29 16:24 [PATCH v6 v6 0/3] media: ov8856: Add devicetree support Robert Foss 2020-04-29 16:24 ` Robert Foss 2020-04-29 16:24 ` [PATCH v9 1/3] media: dt-bindings: ov8856: Document YAML bindings Robert Foss 2020-04-29 16:24 ` Robert Foss 2020-04-29 16:24 ` [PATCH v6 2/3] media: ov8856: Add devicetree support Robert Foss 2020-04-29 16:24 ` Robert Foss 2020-04-30 9:35 ` Marco Felsch 2020-04-30 9:35 ` Marco Felsch 2020-04-30 9:45 ` Sakari Ailus 2020-04-30 9:45 ` Sakari Ailus 2020-04-30 9:53 ` Marco Felsch 2020-04-30 9:53 ` Marco Felsch 2020-04-30 9:59 ` Sakari Ailus 2020-04-30 9:59 ` Sakari Ailus 2020-04-30 10:11 ` Marco Felsch [this message] 2020-04-30 10:11 ` Marco Felsch 2020-04-30 10:20 ` Sakari Ailus 2020-04-30 10:20 ` Sakari Ailus 2020-04-30 12:07 ` Marco Felsch 2020-04-30 12:07 ` Marco Felsch 2020-04-30 13:32 ` Sakari Ailus 2020-04-30 13:32 ` Sakari Ailus 2020-04-30 16:11 ` Robert Foss 2020-04-30 16:11 ` Robert Foss 2020-05-04 6:24 ` Marco Felsch 2020-05-04 6:24 ` Marco Felsch 2020-04-29 16:24 ` [PATCH v6 3/3] media: ov8856: Implement sensor module revision identification Robert Foss 2020-04-29 16:24 ` Robert Foss
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200430101157.GD2188@pengutronix.de \ --to=m.felsch@pengutronix.de \ --cc=andriy.shevchenko@linux.intel.com \ --cc=devicetree@vger.kernel.org \ --cc=dongchun.zhu@mediatek.com \ --cc=festevam@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=maxime@cerno.tech \ --cc=robert.foss@linaro.org \ --cc=sakari.ailus@iki.fi \ --cc=tfiga@chromium.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.