Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1626040
| From | Vivek Gautam <vivek.gautam@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 1/4] reset: Add API to count number of reset available with device |
| Date | 2017-04-19 13:50 +0200 |
| Message-ID | <txWhr-2Xi-11@gated-at.bofh.it> (permalink) |
| References | <txzux-5A7-3@gated-at.bofh.it> <txzux-5A7-11@gated-at.bofh.it> <txV22-2h2-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/19/2017 03:55 PM, Philipp Zabel wrote:
> On Tue, 2017-04-18 at 16:51 +0530, Vivek Gautam wrote:
>> Count number of reset phandles available with the device node
>> to know the resets a given device has.
>>
>> Cc: Philipp Zabel <p.zabel@pengutronix.de>
>> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
>> ---
>> drivers/reset/core.c | 23 +++++++++++++++++++++++
>> include/linux/reset.h | 6 ++++++
>> 2 files changed, 29 insertions(+)
>>
>> diff --git a/drivers/reset/core.c b/drivers/reset/core.c
>> index cd739d2fa160..f0a06a7aca93 100644
>> --- a/drivers/reset/core.c
>> +++ b/drivers/reset/core.c
>> @@ -465,3 +465,26 @@ int device_reset(struct device *dev)
>> return ret;
>> }
>> EXPORT_SYMBOL_GPL(device_reset);
>> +
>> +/**
>> + * of_reset_control_get_count - Count number of resets available with a device
>> + *
>> + * @node: device node that contains 'resets'.
>> + *
>> + * Returns positive reset count on success, or error number on failure and
>> + * on count being zero.
>> + */
>> +int of_reset_control_get_count(struct device_node *node)
>> +{
>> + int count;
>> +
>> + if (!node)
>> + return -EINVAL;
>> +
>> + count = of_count_phandle_with_args(node, "resets", "#reset-cells");
>> + if (count == 0)
>> + count = -ENOENT;
>> +
>> + return count;
>> +}
>> +EXPORT_SYMBOL_GPL(of_reset_control_get_count);
> This doesn't need to be public anymore. You can make it static and merge
> it into the second patch.
Thanks for reviewing the series.
Sure, make sense to make it static and squash in the second patch.
Best Regards
Vivek
>
> regards
> Philipp
>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V3 0/4] reset: APIs to manage a list of resets Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-18 13:30 +0200
[PATCH V3 2/4] reset: Add APIs to manage array of resets Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-18 13:30 +0200
Re: [PATCH V3 2/4] reset: Add APIs to manage array of resets Philipp Zabel <p.zabel@pengutronix.de> - 2017-04-19 12:40 +0200
Re: [PATCH V3 2/4] reset: Add APIs to manage array of resets Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-19 14:00 +0200
[PATCH V3 1/4] reset: Add API to count number of reset available with device Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-18 13:30 +0200
Re: [PATCH V3 1/4] reset: Add API to count number of reset available with device Philipp Zabel <p.zabel@pengutronix.de> - 2017-04-19 12:30 +0200
Re: [PATCH V3 1/4] reset: Add API to count number of reset available with device Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-19 13:50 +0200
[PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-18 13:30 +0200
Re: [PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers Philipp Zabel <p.zabel@pengutronix.de> - 2017-04-19 12:50 +0200
Re: [PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers Jon Hunter <jonathanh@nvidia.com> - 2017-04-24 14:50 +0200
[PATCH V3 3/4] usb: dwc3: of-simple: Add support to get resets for the device Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-18 13:30 +0200
Re: [PATCH V3 3/4] usb: dwc3: of-simple: Add support to get resets for the device Philipp Zabel <p.zabel@pengutronix.de> - 2017-04-19 12:40 +0200
Re: [PATCH V3 3/4] usb: dwc3: of-simple: Add support to get resets for the device Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-04-19 14:10 +0200
csiph-web