All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanimir Varbanov <svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
To: David Collins <collinsd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Courtney Cavin
	<courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
	Bjorn Andersson
	<bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
	Josh Cartwright <joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: Re: [PATCH v3 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs
Date: Thu, 31 Jul 2014 11:48:00 +0300	[thread overview]
Message-ID: <53DA02C0.2050606@mm-sol.com> (raw)
In-Reply-To: <53D8182A.5050204-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

Hi David,

Thanks for the comments!

On 07/30/2014 12:54 AM, David Collins wrote:
> On 07/24/2014 05:45 AM, Stanimir Varbanov wrote:
>> From: Josh Cartwright <joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
>>
>> The Qualcomm SPMI PMIC chips are components used with the
>> Snapdragon 800 series SoC family.  This driver exists
>> largely as a glue mfd component, it exists to be an owner
>> of an SPMI regmap for children devices described in
>> device tree.
>>
>> Signed-off-by: Josh Cartwright <joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
>> Signed-off-by: Stanimir Varbanov <svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
>> Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> ---
>>  drivers/mfd/Kconfig       |   16 +++++++++++
>>  drivers/mfd/Makefile      |    1 +
>>  drivers/mfd/pm8xxx-spmi.c |   65 +++++++++++++++++++++++++++++++++++++++++++++
> 
> Would it be possible to rename this driver: qcom-spmi-pmic.c?  The driver
> will be supporting several PMICs that do not fit the pm8xxx naming scheme.
>  One of which is even specified in the compatible list of this driver
> (pma8084).  There is presently downstream support for the following PMICs:
> PM8019, PM8110, PM8226, PM8841, PM8916, PM8941, PM8994, PMA8084, PMD9635,
> PMI8962, and PMI8994 [1].  Four of these do not fit the "PM8XXX" template.

I haven't strong opinion on the file names. The qcom prefix is the one
which annoying me. If you look at /drivers/mfd the company name prefixes
are very few.

The *compatible* strings are the important thing here. So If MFD
maintainer is fine with this name I'm fine too.

> 
> If we can agree on changing the file name for the driver, then all other
> instances of "pm8xxx" would need to be renamed in this patch series (e.g.
> config options, function names, struct names, DT binding documentation, etc.)
> 
> It would probably be good to rename pm8xxx-ssbi.c to qcom-ssbi-pmic.c as
> well in order to maintain consistency.
> 
> (...)
>> +static const struct regmap_config pm8xxx_regmap_config = {
>> +	.reg_bits	= 16,
>> +	.val_bits	= 8,
>> +	.max_register	= 0xffff,
> 
> Can you please add the following line here?
> 
> 	.fast_io	= true;
> 
> This will cause a spinlock to be held during SPMI transactions instead of
> a mutex lock.  This is needed because several downstream peripheral
> drivers need to make SPMI read and write calls from atomic context.  I
> have commented on this point in a previous thread with specific examples [2].

OK, I understand the need of atomic context, but pmic_arb_read_cmd() and
pmic_arb_write_cmd() functions use raw_spin_lock_irqsave already. Isn't
those locks enough?

> 
>> +};
> 
> (...)
>> +static const struct of_device_id pm8xxx_id_table[] = {
>> +	{ .compatible = "qcom,pm8941" },
>> +	{ .compatible = "qcom,pm8841" },
>> +	{ .compatible = "qcom,pma8084" },
> 
> Would it be possible to add a generic compatible string as well?  Perhaps
> something like "qcom,spmi-pmic" could be used.  This driver is not doing
> anything with the PMIC specific compatible strings.  The generic
> compatible string could be specified in device tree in conjunction a PMIC
> specific string that is not present in this list.  That way, this driver
> file would not need to be touched as new PMIC chips are introduced unless
> some weird workaround is needed.  In that case, the PMIC specific
> compatible string could be added to the list along with whatever special
> function is needed to handle it.

OK, I'm fine with this suggestion.

-- 
regards,
Stan
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: svarbanov@mm-sol.com (Stanimir Varbanov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs
Date: Thu, 31 Jul 2014 11:48:00 +0300	[thread overview]
Message-ID: <53DA02C0.2050606@mm-sol.com> (raw)
In-Reply-To: <53D8182A.5050204@codeaurora.org>

Hi David,

Thanks for the comments!

On 07/30/2014 12:54 AM, David Collins wrote:
> On 07/24/2014 05:45 AM, Stanimir Varbanov wrote:
>> From: Josh Cartwright <joshc@codeaurora.org>
>>
>> The Qualcomm SPMI PMIC chips are components used with the
>> Snapdragon 800 series SoC family.  This driver exists
>> largely as a glue mfd component, it exists to be an owner
>> of an SPMI regmap for children devices described in
>> device tree.
>>
>> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
>> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
>> Acked-by: Lee Jones <lee.jones@linaro.org>
>> ---
>>  drivers/mfd/Kconfig       |   16 +++++++++++
>>  drivers/mfd/Makefile      |    1 +
>>  drivers/mfd/pm8xxx-spmi.c |   65 +++++++++++++++++++++++++++++++++++++++++++++
> 
> Would it be possible to rename this driver: qcom-spmi-pmic.c?  The driver
> will be supporting several PMICs that do not fit the pm8xxx naming scheme.
>  One of which is even specified in the compatible list of this driver
> (pma8084).  There is presently downstream support for the following PMICs:
> PM8019, PM8110, PM8226, PM8841, PM8916, PM8941, PM8994, PMA8084, PMD9635,
> PMI8962, and PMI8994 [1].  Four of these do not fit the "PM8XXX" template.

I haven't strong opinion on the file names. The qcom prefix is the one
which annoying me. If you look at /drivers/mfd the company name prefixes
are very few.

The *compatible* strings are the important thing here. So If MFD
maintainer is fine with this name I'm fine too.

> 
> If we can agree on changing the file name for the driver, then all other
> instances of "pm8xxx" would need to be renamed in this patch series (e.g.
> config options, function names, struct names, DT binding documentation, etc.)
> 
> It would probably be good to rename pm8xxx-ssbi.c to qcom-ssbi-pmic.c as
> well in order to maintain consistency.
> 
> (...)
>> +static const struct regmap_config pm8xxx_regmap_config = {
>> +	.reg_bits	= 16,
>> +	.val_bits	= 8,
>> +	.max_register	= 0xffff,
> 
> Can you please add the following line here?
> 
> 	.fast_io	= true;
> 
> This will cause a spinlock to be held during SPMI transactions instead of
> a mutex lock.  This is needed because several downstream peripheral
> drivers need to make SPMI read and write calls from atomic context.  I
> have commented on this point in a previous thread with specific examples [2].

OK, I understand the need of atomic context, but pmic_arb_read_cmd() and
pmic_arb_write_cmd() functions use raw_spin_lock_irqsave already. Isn't
those locks enough?

> 
>> +};
> 
> (...)
>> +static const struct of_device_id pm8xxx_id_table[] = {
>> +	{ .compatible = "qcom,pm8941" },
>> +	{ .compatible = "qcom,pm8841" },
>> +	{ .compatible = "qcom,pma8084" },
> 
> Would it be possible to add a generic compatible string as well?  Perhaps
> something like "qcom,spmi-pmic" could be used.  This driver is not doing
> anything with the PMIC specific compatible strings.  The generic
> compatible string could be specified in device tree in conjunction a PMIC
> specific string that is not present in this list.  That way, this driver
> file would not need to be touched as new PMIC chips are introduced unless
> some weird workaround is needed.  In that case, the PMIC specific
> compatible string could be added to the list along with whatever special
> function is needed to handle it.

OK, I'm fine with this suggestion.

-- 
regards,
Stan

WARNING: multiple messages have this Message-ID (diff)
From: Stanimir Varbanov <svarbanov@mm-sol.com>
To: David Collins <collinsd@codeaurora.org>,
	Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Grant Likely <grant.likely@linaro.org>,
	Courtney Cavin <courtney.cavin@sonymobile.com>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Josh Cartwright <joshc@codeaurora.org>,
	Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [PATCH v3 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs
Date: Thu, 31 Jul 2014 11:48:00 +0300	[thread overview]
Message-ID: <53DA02C0.2050606@mm-sol.com> (raw)
In-Reply-To: <53D8182A.5050204@codeaurora.org>

Hi David,

Thanks for the comments!

On 07/30/2014 12:54 AM, David Collins wrote:
> On 07/24/2014 05:45 AM, Stanimir Varbanov wrote:
>> From: Josh Cartwright <joshc@codeaurora.org>
>>
>> The Qualcomm SPMI PMIC chips are components used with the
>> Snapdragon 800 series SoC family.  This driver exists
>> largely as a glue mfd component, it exists to be an owner
>> of an SPMI regmap for children devices described in
>> device tree.
>>
>> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
>> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
>> Acked-by: Lee Jones <lee.jones@linaro.org>
>> ---
>>  drivers/mfd/Kconfig       |   16 +++++++++++
>>  drivers/mfd/Makefile      |    1 +
>>  drivers/mfd/pm8xxx-spmi.c |   65 +++++++++++++++++++++++++++++++++++++++++++++
> 
> Would it be possible to rename this driver: qcom-spmi-pmic.c?  The driver
> will be supporting several PMICs that do not fit the pm8xxx naming scheme.
>  One of which is even specified in the compatible list of this driver
> (pma8084).  There is presently downstream support for the following PMICs:
> PM8019, PM8110, PM8226, PM8841, PM8916, PM8941, PM8994, PMA8084, PMD9635,
> PMI8962, and PMI8994 [1].  Four of these do not fit the "PM8XXX" template.

I haven't strong opinion on the file names. The qcom prefix is the one
which annoying me. If you look at /drivers/mfd the company name prefixes
are very few.

The *compatible* strings are the important thing here. So If MFD
maintainer is fine with this name I'm fine too.

> 
> If we can agree on changing the file name for the driver, then all other
> instances of "pm8xxx" would need to be renamed in this patch series (e.g.
> config options, function names, struct names, DT binding documentation, etc.)
> 
> It would probably be good to rename pm8xxx-ssbi.c to qcom-ssbi-pmic.c as
> well in order to maintain consistency.
> 
> (...)
>> +static const struct regmap_config pm8xxx_regmap_config = {
>> +	.reg_bits	= 16,
>> +	.val_bits	= 8,
>> +	.max_register	= 0xffff,
> 
> Can you please add the following line here?
> 
> 	.fast_io	= true;
> 
> This will cause a spinlock to be held during SPMI transactions instead of
> a mutex lock.  This is needed because several downstream peripheral
> drivers need to make SPMI read and write calls from atomic context.  I
> have commented on this point in a previous thread with specific examples [2].

OK, I understand the need of atomic context, but pmic_arb_read_cmd() and
pmic_arb_write_cmd() functions use raw_spin_lock_irqsave already. Isn't
those locks enough?

> 
>> +};
> 
> (...)
>> +static const struct of_device_id pm8xxx_id_table[] = {
>> +	{ .compatible = "qcom,pm8941" },
>> +	{ .compatible = "qcom,pm8841" },
>> +	{ .compatible = "qcom,pma8084" },
> 
> Would it be possible to add a generic compatible string as well?  Perhaps
> something like "qcom,spmi-pmic" could be used.  This driver is not doing
> anything with the PMIC specific compatible strings.  The generic
> compatible string could be specified in device tree in conjunction a PMIC
> specific string that is not present in this list.  That way, this driver
> file would not need to be touched as new PMIC chips are introduced unless
> some weird workaround is needed.  In that case, the PMIC specific
> compatible string could be added to the list along with whatever special
> function is needed to handle it.

OK, I'm fine with this suggestion.

-- 
regards,
Stan

  parent reply	other threads:[~2014-07-31  8:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 12:45 [PATCH v3 0/4] Support for Qualcomm QPNP PMIC's Stanimir Varbanov
2014-07-24 12:45 ` Stanimir Varbanov
2014-07-24 12:45 ` [PATCH v3 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs Stanimir Varbanov
2014-07-24 12:45   ` Stanimir Varbanov
2014-07-29 21:54   ` David Collins
2014-07-29 21:54     ` David Collins
     [not found]     ` <53D8182A.5050204-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-07-31  8:48       ` Stanimir Varbanov [this message]
2014-07-31  8:48         ` Stanimir Varbanov
2014-07-31  8:48         ` Stanimir Varbanov
     [not found]         ` <53DA02C0.2050606-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-07-31 20:33           ` David Collins
2014-07-31 20:33             ` David Collins
2014-07-31 20:33             ` David Collins
2014-08-01  8:31         ` Stanimir Varbanov
2014-08-01  8:31           ` Stanimir Varbanov
2014-08-01 11:23           ` Lee Jones
2014-08-01 11:23             ` Lee Jones
2014-07-24 12:45 ` [PATCH v3 2/4] mfd: pm8xxx-spmi: document DT bindings " Stanimir Varbanov
2014-07-24 12:45   ` Stanimir Varbanov
2014-07-29 22:23   ` David Collins
2014-07-29 22:23     ` David Collins
     [not found]     ` <53D81EE1.7040309-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-07-31  8:58       ` Stanimir Varbanov
2014-07-31  8:58         ` Stanimir Varbanov
2014-07-31  8:58         ` Stanimir Varbanov
2014-07-31 20:53         ` David Collins
2014-07-31 20:53           ` David Collins
     [not found] ` <1406205921-7452-1-git-send-email-svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-07-24 12:45   ` [PATCH v3 3/4] ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes Stanimir Varbanov
2014-07-24 12:45     ` Stanimir Varbanov
2014-07-24 12:45     ` Stanimir Varbanov
2014-07-24 12:45 ` [PATCH v3 4/4] mfd: pm8921: rename pm8921-core driver Stanimir Varbanov
2014-07-24 12:45   ` Stanimir Varbanov
2014-07-28 14:20 ` [PATCH v3 0/4] Support for Qualcomm QPNP PMIC's Stanimir Varbanov
2014-07-28 14:20   ` Stanimir Varbanov

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=53DA02C0.2050606@mm-sol.com \
    --to=svarbanov-neyub+7iv8pqt0dzr+alfa@public.gmane.org \
    --cc=bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
    --cc=collinsd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.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: link
Be 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.