From: Stephen Boyd <sboyd@codeaurora.org>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-clk@vger.kernel.org, ssantosh@kernel.org,
mturquette@baylibre.com, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv4 2/2] clk: keystone: Add sci-clk driver support
Date: Mon, 12 Jun 2017 19:04:55 -0700 [thread overview]
Message-ID: <20170613020455.GQ20170@codeaurora.org> (raw)
In-Reply-To: <1495458113-7366-3-git-send-email-t-kristo@ti.com>
On 05/22, Tero Kristo wrote:
> +
> +/**
> + * ti_sci_clk_probe - Probe function for the TI SCI clock driver
> + * @pdev: platform device pointer to be probed
> + *
> + * Probes the TI SCI clock device. Allocates a new clock provider
> + * and registers this to the common clock framework. Also applies
> + * any required flags to the identified clocks via clock lists
> + * supplied from DT. Returns 0 for success, negative error value
> + * for failure.
> + */
> +static int ti_sci_clk_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct device_node *np = dev->of_node;
> + struct sci_clk_provider *provider;
> + const struct ti_sci_handle *handle;
> + struct sci_clk_data *data;
> + int ret;
> +
> + data = (struct sci_clk_data *)of_device_get_match_data(dev);
It would be nice to avoid this cast, and also check for NULL
here. I tried to do it in a few minutes but then that caused a
problem with throwing away const on sci_clk_data. Can this be
resolved? We probably shouldn't be assigning the
sci_clk_data::clocks member anyway if the structure is const
assuming it goes into the read-only section. It may cause some
restructuring of the code though.
> +
> + handle = devm_ti_sci_get_handle(dev);
> + if (IS_ERR(handle))
> + return PTR_ERR(handle);
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2017-06-13 2:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 13:01 [PATCHv4 0/2] clk: keystone: add sci-clk support Tero Kristo
2017-05-22 13:01 ` [PATCHv4 1/2] Documentation: dt: Add TI SCI clock driver Tero Kristo
2017-05-31 16:27 ` Rob Herring
2017-05-22 13:01 ` [PATCHv4 2/2] clk: keystone: Add sci-clk driver support Tero Kristo
2017-06-13 2:04 ` Stephen Boyd [this message]
2017-06-13 7:06 ` Tero Kristo
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=20170613020455.GQ20170@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ssantosh@kernel.org \
--cc=t-kristo@ti.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).