All of lore.kernel.org
 help / color / mirror / Atom feed
From: kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
To: Bjorn Andersson
	<bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Daniel Thompson
	<daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Jingoo Han <jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Richard Purdie <rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
	Jacek Anaszewski
	<jacek.anaszewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Bartlomiej Zolnierkiewicz
	<b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V1 1/4] qcom: spmi-wled: Add support for qcom wled driver
Date: Fri, 17 Nov 2017 15:22:32 +0530	[thread overview]
Message-ID: <15f6f769f5883af35f153b0c5e570442@codeaurora.org> (raw)
In-Reply-To: <20171117065640.GU28761@minitux>

On 2017-11-17 12:26, Bjorn Andersson wrote:
> On Thu 16 Nov 22:36 PST 2017, kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org wrote:
> 
>> On 2017-11-16 22:25, Bjorn Andersson wrote:
>> > On Thu 16 Nov 04:18 PST 2017, Kiran Gunda wrote:
>> >
>> > > WLED driver provides the interface to the display driver to
>> > > adjust the brightness of the display backlight.
>> > >
>> >
>> > Hi Kiran,
>> >
>> > This driver has a lot in common with the already upstream pm8941-wled.c,
>> > because it's just a new revision of the same block.
>> >
>> > Please extend the existing driver rather than providing a new one
>> > (and yes, renaming the file is okay).
>> >
>> > Regards,
>> > Bjorn
>> 
>> Hi Bjorn,
>> 
>> Yes this driver design is similar to pm8941, however the WLED HW block
>> has undergone quite a few changes in analog and digital from PM8941 to
>> PM8998.
> 
> I can see that, looking at the documentation.
> 
>> Few of them include splitting one module into wled-ctrl and wled-sink
>> peripherals, changes in the register offsets and the bit
>> interpretation.
> 
> This is typical and something we need to handle in all these drivers, 
> to
> avoid having one driver per platform.
> 
>> Hence we concluded that it was better to have a new driver to support
>> this new gen WELD module and decouple it from the pm8941.
> 
> Okay, I can see how it's easier to not have to case about anything but
> pmi8998 in this driver, but where do you add the support for other WLED
> versions? What about PMI8994? Will there not be similar differences
> (registers that has moved around) in the future?
> 
>> Also, going forward this driver will support AMOLED AVDD rail (not
>> supported by pm8941) touching a few more registers/configuration and
>> newer PMICs.
> 
> Is this a feature that was introduced in PMI8998? Will this support not
> be dependent on the pmic version?
> 
>> So spinning off a new driver would make it cleaner and easier to
>> extend further.
>> 
> 
> It's for sure easier at this point in time, but your argumentation
> implies that PMI8998+1 should go into it's own driver as well.
> 
> I suspect that if you're going to reuse this driver for future PMIC
> versions you will have to deal with register layout differences and new
> feature set, and as such I'm not convinced that a new driver is needed.
> 
> 
> Can you give any concrete examples of where it is not possible or
> undesirable to maintain the pm8941 support in the same driver?
> 
> Regards,
> Bjorn

Hi Bjorn,

Thanks for the inputs! Following are the reasons to go for the new 
driver
and this driver can support 5 PMICs.

1.Majority of  register, offsets and config values don’t match  up  
between
  PMI8998 and PM8941
2.Feature such as – SC protection handling in SW cannot be done for 8941 
as
there is no SC event/irq, AMOELD AVDD cannot supported by PM8941
3.Feature such as – string auto-calibration even if common will have to 
use
different offsets/registers in the same SW logic
4.PMI8998, PMI8994, PMI8950 and PM660 all of them have this same WLED 
module
(and register map) with very minor changes unlike 8941.

Thanks,
Kiran


> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-arm-msm" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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: kgunda@codeaurora.org
To: Bjorn Andersson
	<bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Daniel Thompson
	<daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Jingoo Han <jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Richard Purdie <rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
	Jacek Anaszewski
	<jacek.anaszewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Bartlomiej Zolnierkiewicz
	<b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V1 1/4] qcom: spmi-wled: Add support for qcom wled driver
Date: Fri, 17 Nov 2017 09:52:38 +0000	[thread overview]
Message-ID: <15f6f769f5883af35f153b0c5e570442@codeaurora.org> (raw)
In-Reply-To: <20171117065640.GU28761@minitux>

On 2017-11-17 12:26, Bjorn Andersson wrote:
> On Thu 16 Nov 22:36 PST 2017, kgunda@codeaurora.org wrote:
> 
>> On 2017-11-16 22:25, Bjorn Andersson wrote:
>> > On Thu 16 Nov 04:18 PST 2017, Kiran Gunda wrote:
>> >
>> > > WLED driver provides the interface to the display driver to
>> > > adjust the brightness of the display backlight.
>> > >
>> >
>> > Hi Kiran,
>> >
>> > This driver has a lot in common with the already upstream pm8941-wled.c,
>> > because it's just a new revision of the same block.
>> >
>> > Please extend the existing driver rather than providing a new one
>> > (and yes, renaming the file is okay).
>> >
>> > Regards,
>> > Bjorn
>> 
>> Hi Bjorn,
>> 
>> Yes this driver design is similar to pm8941, however the WLED HW block
>> has undergone quite a few changes in analog and digital from PM8941 to
>> PM8998.
> 
> I can see that, looking at the documentation.
> 
>> Few of them include splitting one module into wled-ctrl and wled-sink
>> peripherals, changes in the register offsets and the bit
>> interpretation.
> 
> This is typical and something we need to handle in all these drivers, 
> to
> avoid having one driver per platform.
> 
>> Hence we concluded that it was better to have a new driver to support
>> this new gen WELD module and decouple it from the pm8941.
> 
> Okay, I can see how it's easier to not have to case about anything but
> pmi8998 in this driver, but where do you add the support for other WLED
> versions? What about PMI8994? Will there not be similar differences
> (registers that has moved around) in the future?
> 
>> Also, going forward this driver will support AMOLED AVDD rail (not
>> supported by pm8941) touching a few more registers/configuration and
>> newer PMICs.
> 
> Is this a feature that was introduced in PMI8998? Will this support not
> be dependent on the pmic version?
> 
>> So spinning off a new driver would make it cleaner and easier to
>> extend further.
>> 
> 
> It's for sure easier at this point in time, but your argumentation
> implies that PMI8998+1 should go into it's own driver as well.
> 
> I suspect that if you're going to reuse this driver for future PMIC
> versions you will have to deal with register layout differences and new
> feature set, and as such I'm not convinced that a new driver is needed.
> 
> 
> Can you give any concrete examples of where it is not possible or
> undesirable to maintain the pm8941 support in the same driver?
> 
> Regards,
> Bjorn

Hi Bjorn,

Thanks for the inputs! Following are the reasons to go for the new 
driver
and this driver can support 5 PMICs.

1.Majority of  register, offsets and config values don’t match  up  
between
  PMI8998 and PM8941
2.Feature such as – SC protection handling in SW cannot be done for 8941 
as
there is no SC event/irq, AMOELD AVDD cannot supported by PM8941
3.Feature such as – string auto-calibration even if common will have to 
use
different offsets/registers in the same SW logic
4.PMI8998, PMI8994, PMI8950 and PM660 all of them have this same WLED 
module
(and register map) with very minor changes unlike 8941.

Thanks,
Kiran


> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: kgunda@codeaurora.org
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-arm-msm-owner@vger.kernel.org
Subject: Re: [PATCH V1 1/4] qcom: spmi-wled: Add support for qcom wled driver
Date: Fri, 17 Nov 2017 15:22:32 +0530	[thread overview]
Message-ID: <15f6f769f5883af35f153b0c5e570442@codeaurora.org> (raw)
In-Reply-To: <20171117065640.GU28761@minitux>

On 2017-11-17 12:26, Bjorn Andersson wrote:
> On Thu 16 Nov 22:36 PST 2017, kgunda@codeaurora.org wrote:
> 
>> On 2017-11-16 22:25, Bjorn Andersson wrote:
>> > On Thu 16 Nov 04:18 PST 2017, Kiran Gunda wrote:
>> >
>> > > WLED driver provides the interface to the display driver to
>> > > adjust the brightness of the display backlight.
>> > >
>> >
>> > Hi Kiran,
>> >
>> > This driver has a lot in common with the already upstream pm8941-wled.c,
>> > because it's just a new revision of the same block.
>> >
>> > Please extend the existing driver rather than providing a new one
>> > (and yes, renaming the file is okay).
>> >
>> > Regards,
>> > Bjorn
>> 
>> Hi Bjorn,
>> 
>> Yes this driver design is similar to pm8941, however the WLED HW block
>> has undergone quite a few changes in analog and digital from PM8941 to
>> PM8998.
> 
> I can see that, looking at the documentation.
> 
>> Few of them include splitting one module into wled-ctrl and wled-sink
>> peripherals, changes in the register offsets and the bit
>> interpretation.
> 
> This is typical and something we need to handle in all these drivers, 
> to
> avoid having one driver per platform.
> 
>> Hence we concluded that it was better to have a new driver to support
>> this new gen WELD module and decouple it from the pm8941.
> 
> Okay, I can see how it's easier to not have to case about anything but
> pmi8998 in this driver, but where do you add the support for other WLED
> versions? What about PMI8994? Will there not be similar differences
> (registers that has moved around) in the future?
> 
>> Also, going forward this driver will support AMOLED AVDD rail (not
>> supported by pm8941) touching a few more registers/configuration and
>> newer PMICs.
> 
> Is this a feature that was introduced in PMI8998? Will this support not
> be dependent on the pmic version?
> 
>> So spinning off a new driver would make it cleaner and easier to
>> extend further.
>> 
> 
> It's for sure easier at this point in time, but your argumentation
> implies that PMI8998+1 should go into it's own driver as well.
> 
> I suspect that if you're going to reuse this driver for future PMIC
> versions you will have to deal with register layout differences and new
> feature set, and as such I'm not convinced that a new driver is needed.
> 
> 
> Can you give any concrete examples of where it is not possible or
> undesirable to maintain the pm8941 support in the same driver?
> 
> Regards,
> Bjorn

Hi Bjorn,

Thanks for the inputs! Following are the reasons to go for the new 
driver
and this driver can support 5 PMICs.

1.Majority of  register, offsets and config values don’t match  up  
between
  PMI8998 and PM8941
2.Feature such as – SC protection handling in SW cannot be done for 8941 
as
there is no SC event/irq, AMOELD AVDD cannot supported by PM8941
3.Feature such as – string auto-calibration even if common will have to 
use
different offsets/registers in the same SW logic
4.PMI8998, PMI8994, PMI8950 and PM660 all of them have this same WLED 
module
(and register map) with very minor changes unlike 8941.

Thanks,
Kiran


> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-11-17  9:52 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 12:18 [PATCH V1 0/4] qcom: spmi-wled: Support for QCOM wled driver Kiran Gunda
2017-11-16 12:18 ` [PATCH V1 2/4] qcom: spmi-wled: Add support for short circuit handling Kiran Gunda
2017-11-16 12:30   ` Kiran Gunda
     [not found]   ` <1510834717-21765-3-git-send-email-kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-11-17 20:30     ` Rob Herring
2017-11-17 20:30       ` Rob Herring
2017-11-17 20:30       ` Rob Herring
2017-11-20 11:42       ` kgunda
2017-11-20 11:54         ` kgunda
2017-12-05  4:35     ` Bjorn Andersson
2017-12-05  4:35       ` Bjorn Andersson
2017-12-05  4:35       ` Bjorn Andersson
2017-12-11  9:28       ` kgunda
2017-12-11  9:40         ` kgunda
2017-11-16 12:18 ` [PATCH V1 3/4] qcom: spmi-wled: Add support for OVP interrupt handling Kiran Gunda
2017-11-16 12:30   ` Kiran Gunda
     [not found]   ` <1510834717-21765-4-git-send-email-kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-05  4:45     ` Bjorn Andersson
2017-12-05  4:45       ` Bjorn Andersson
2017-12-05  4:45       ` Bjorn Andersson
2017-12-11  9:31       ` kgunda
2017-12-11  9:43         ` kgunda
     [not found] ` <1510834717-21765-1-git-send-email-kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-11-16 12:18   ` [PATCH V1 1/4] qcom: spmi-wled: Add support for qcom wled driver Kiran Gunda
2017-11-16 12:30     ` Kiran Gunda
2017-11-16 12:18     ` Kiran Gunda
2017-11-16 16:55     ` Bjorn Andersson
2017-11-16 16:55       ` Bjorn Andersson
2017-11-17  6:36       ` kgunda
2017-11-17  6:48         ` kgunda
2017-11-17  6:56         ` Bjorn Andersson
2017-11-17  6:56           ` Bjorn Andersson
2017-11-17  8:33           ` Lee Jones
2017-11-17  8:33             ` Lee Jones
2017-11-17 11:01             ` kgunda
2017-11-17 11:13               ` kgunda
2017-11-17  9:52           ` kgunda-sgV2jX0FEOL9JmXXK+q4OQ [this message]
2017-11-17  9:52             ` kgunda
2017-11-17  9:52             ` kgunda
2017-11-17 20:28     ` Rob Herring
2017-11-17 20:28       ` Rob Herring
2017-12-05  2:01     ` Bjorn Andersson
2017-12-05  2:01       ` Bjorn Andersson
2017-12-11  9:11       ` kgunda
2017-12-11  9:23         ` kgunda
     [not found]     ` <1510834717-21765-2-git-send-email-kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-15 20:30       ` Pavel Machek
2017-12-15 20:30         ` Pavel Machek
2017-12-15 20:30         ` Pavel Machek
2017-11-16 12:18   ` [PATCH V1 4/4] qcom: spmi-wled: Add auto-calibration logic support Kiran Gunda
2017-11-16 12:30     ` Kiran Gunda
2017-11-16 12:18     ` Kiran Gunda
2017-12-05  5:40     ` Bjorn Andersson
2017-12-05  5:40       ` Bjorn Andersson
2018-04-19 10:45       ` kgunda
2018-04-19 10:57         ` kgunda
2018-04-19 15:58         ` Bjorn Andersson
2018-04-19 15:58           ` Bjorn Andersson
2018-04-20  5:43           ` kgunda
2018-04-20  5:55             ` kgunda
2018-04-20 16:03             ` Bjorn Andersson
2018-04-20 16:03               ` Bjorn Andersson
2018-04-23 11:26               ` kgunda
2018-04-23 11:38                 ` kgunda
2018-04-23 10:35             ` kgunda
2018-04-23 10:47               ` kgunda

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=15f6f769f5883af35f153b0c5e570442@codeaurora.org \
    --to=kgunda-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jacek.anaszewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pavel-+ZI9xUNit7I@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=rpurdie-Fm38FmjxZ/leoWH0uzbU5w@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.