diff for duplicates of <20160620081830.GK21702@dell> diff --git a/a/1.txt b/N1/1.txt index 469228e..cea64f1 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -19,9 +19,9 @@ On Mon, 20 Jun 2016, Phil Reid wrote: > >>>>>>>>>where the value at index 0 may well be non-zero > >>>>>>>>>(tegra30-apalis-eval.dts and tegra30-colibri-eval-v3.dts are real-life > >>>>>>>>>examples). -> >>>>>>>>>Thus brightness = 0 does not necessarily mean that the PWM output +> >>>>>>>>>Thus brightness == 0 does not necessarily mean that the PWM output > >>>>>>>>>will be inactive. -> >>>>>>>>>Check for 'duty_cycle = 0' rather than 'brightness = 0' to decide +> >>>>>>>>>Check for 'duty_cycle == 0' rather than 'brightness == 0' to decide > >>>>>>>>>whether to disable the PWM. > >>>>>>>>> > >>>>>>>>>Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> @@ -87,8 +87,8 @@ On Mon, 20 Jun 2016, Phil Reid wrote: > >>>>>>someone is going to get screwed by this logic. > >>>>>> > >>>>>The backlight framework does not (and does not need to) know anything -> >>>>>about PWM duty cycles. Its 'brightness' values are consistently 0 = -> >>>>>dark, max = brightest in either case. +> >>>>>about PWM duty cycles. Its 'brightness' values are consistently 0 == +> >>>>>dark, max == brightest in either case. > >>>> > >>>>What I'm getting at is; by the look of the documentation, the > >>>>brightest setting can either be a duty cycle of 0 or 255. So what @@ -102,7 +102,7 @@ On Mon, 20 Jun 2016, Phil Reid wrote: > >>>first element of brightness-levels, the PWM will be disabled rather than > >>>switched to the given duty cycle. > >>>Disabling the PWM should have the same effect as setting the duty cycle -> >>>to 0, so it is safe to check for duty_cycle = 0 to decide whether to +> >>>to 0, so it is safe to check for duty_cycle == 0 to decide whether to > >>>disable the PWM. > >> > >>I agree with this. BUT, that's not what you're doing is it? @@ -116,27 +116,27 @@ On Mon, 20 Jun 2016, Phil Reid wrote: > >>} else > >> pwm_backlight_power_off(pb); > >> -> >>Let's say duty_cycle = 0. In some cases this can mean "turn +> >>Let's say duty_cycle == 0. In some cases this can mean "turn > >>brightness up to the *maximum*", but with your new logic you just > >>turned the backlight *off*. > >> > >Huh? Please think again! -> > - duty_cycle = 0 means a CONSTANT LOW level on the PWM output. Agreed? +> > - duty_cycle == 0 means a CONSTANT LOW level on the PWM output. Agreed? > > - Disabling the PWM usually achieves a CONSTANT LOW level on the PWM > > output. Agreed? -> >So duty_cycle = 0 <=> disable the PWM no matter whether the backlight +> >So duty_cycle == 0 <=> disable the PWM no matter whether the backlight > >is darkest or brightest at this duty cycle setting! > > > >The backlight controller does not know anything about the value of the > >'brightness' variable in the code but only sees the 'duty_cycle' value. -> >When brightness = 0 translates into max. duty cycle, the original code +> >When brightness == 0 translates into max. duty cycle, the original code > >will switch the PWM OFF (which is equivalent to a ZERO duty cycle), when > >it rather should operate at the max. duty cycle. > >When duty_cycle is '0', this is equivalent to the PWM output being at > >constant LOW level which is the same as being switched OFF in the usual > >cases. > > -> >When the brightness is maximum at duty_cycle = 0, that means, that the +> >When the brightness is maximum at duty_cycle == 0, that means, that the > >backlight is brightest when the control pin is constantly LOW, which > >is usually the case when the PWM is disabled. This is exactly what the > >patch does achieve! @@ -144,15 +144,15 @@ On Mon, 20 Jun 2016, Phil Reid wrote: > >level will turn to max. brightness rather than off when selecting > >brightness level 0 (max. PWM duty cycle). > > -> >>Conversely, let's say duty_cycle = 255. In some cases this can mean +> >>Conversely, let's say duty_cycle == 255. In some cases this can mean > >>"turn the brightness to the *lowest* setting" i.e. *off*. Well your > >>logic just turned the backlight *on*. > >> > >OK. Let's try a sequence of brightness levels and duty cycles: > >For simplicity assume a range of brightness levels from 0..100, so > >that the 'brightness' value directly represents the duty cycle of the -> >PWM. So either: brightness = 0 => duty cycle = 0% => constant LOW -> >Or: brightnes = 0 => duty cycle = 100% => constant HIGH. +> >PWM. So either: brightness == 0 => duty cycle == 0% => constant LOW +> >Or: brightnes == 0 => duty cycle == 100% => constant HIGH. > > > >Normal range with current and patched code: > > brightness duty_cycle @@ -189,7 +189,7 @@ Yes exactly. Look at this again: -> Let's say duty_cycle = 0. In some cases this can mean "turn +> Let's say duty_cycle == 0. In some cases this can mean "turn > brightness up to the *maximum*", but with your new logic you just > turned the backlight *off*. diff --git a/a/content_digest b/N1/content_digest index c0264c1..21c1b3a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -10,7 +10,7 @@ "ref\09d79cc78-ef51-9461-c6dc-8a28945440ee@electromag.com.au\0" "From\0Lee Jones <lee.jones@linaro.org>\0" "Subject\0Re: [PATCHv2] backlight: pwm_bl: disable PWM when 'duty_cycle' is zero\0" - "Date\0Mon, 20 Jun 2016 08:18:30 +0000\0" + "Date\0Mon, 20 Jun 2016 09:18:30 +0100\0" "To\0Phil Reid <preid@electromag.com.au>\0" "Cc\0Lothar Wa\303\237mann <LW@karo-electronics.de>" Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> @@ -50,9 +50,9 @@ "> >>>>>>>>>where the value at index 0 may well be non-zero\n" "> >>>>>>>>>(tegra30-apalis-eval.dts and tegra30-colibri-eval-v3.dts are real-life\n" "> >>>>>>>>>examples).\n" - "> >>>>>>>>>Thus brightness = 0 does not necessarily mean that the PWM output\n" + "> >>>>>>>>>Thus brightness == 0 does not necessarily mean that the PWM output\n" "> >>>>>>>>>will be inactive.\n" - "> >>>>>>>>>Check for 'duty_cycle = 0' rather than 'brightness = 0' to decide\n" + "> >>>>>>>>>Check for 'duty_cycle == 0' rather than 'brightness == 0' to decide\n" "> >>>>>>>>>whether to disable the PWM.\n" "> >>>>>>>>>\n" "> >>>>>>>>>Signed-off-by: Lothar Wa\303\237mann <LW@KARO-electronics.de>\n" @@ -118,8 +118,8 @@ "> >>>>>>someone is going to get screwed by this logic.\n" "> >>>>>>\n" "> >>>>>The backlight framework does not (and does not need to) know anything\n" - "> >>>>>about PWM duty cycles. Its 'brightness' values are consistently 0 =\n" - "> >>>>>dark, max = brightest in either case.\n" + "> >>>>>about PWM duty cycles. Its 'brightness' values are consistently 0 ==\n" + "> >>>>>dark, max == brightest in either case.\n" "> >>>>\n" "> >>>>What I'm getting at is; by the look of the documentation, the\n" "> >>>>brightest setting can either be a duty cycle of 0 or 255. So what\n" @@ -133,7 +133,7 @@ "> >>>first element of brightness-levels, the PWM will be disabled rather than\n" "> >>>switched to the given duty cycle.\n" "> >>>Disabling the PWM should have the same effect as setting the duty cycle\n" - "> >>>to 0, so it is safe to check for duty_cycle = 0 to decide whether to\n" + "> >>>to 0, so it is safe to check for duty_cycle == 0 to decide whether to\n" "> >>>disable the PWM.\n" "> >>\n" "> >>I agree with this. BUT, that's not what you're doing is it?\n" @@ -147,27 +147,27 @@ "> >>} else\n" "> >> pwm_backlight_power_off(pb);\n" "> >>\n" - "> >>Let's say duty_cycle = 0. In some cases this can mean \"turn\n" + "> >>Let's say duty_cycle == 0. In some cases this can mean \"turn\n" "> >>brightness up to the *maximum*\", but with your new logic you just\n" "> >>turned the backlight *off*.\n" "> >>\n" "> >Huh? Please think again!\n" - "> > - duty_cycle = 0 means a CONSTANT LOW level on the PWM output. Agreed?\n" + "> > - duty_cycle == 0 means a CONSTANT LOW level on the PWM output. Agreed?\n" "> > - Disabling the PWM usually achieves a CONSTANT LOW level on the PWM\n" "> > output. Agreed?\n" - "> >So duty_cycle = 0 <=> disable the PWM no matter whether the backlight\n" + "> >So duty_cycle == 0 <=> disable the PWM no matter whether the backlight\n" "> >is darkest or brightest at this duty cycle setting!\n" "> >\n" "> >The backlight controller does not know anything about the value of the\n" "> >'brightness' variable in the code but only sees the 'duty_cycle' value.\n" - "> >When brightness = 0 translates into max. duty cycle, the original code\n" + "> >When brightness == 0 translates into max. duty cycle, the original code\n" "> >will switch the PWM OFF (which is equivalent to a ZERO duty cycle), when\n" "> >it rather should operate at the max. duty cycle.\n" "> >When duty_cycle is '0', this is equivalent to the PWM output being at\n" "> >constant LOW level which is the same as being switched OFF in the usual\n" "> >cases.\n" "> >\n" - "> >When the brightness is maximum at duty_cycle = 0, that means, that the\n" + "> >When the brightness is maximum at duty_cycle == 0, that means, that the\n" "> >backlight is brightest when the control pin is constantly LOW, which\n" "> >is usually the case when the PWM is disabled. This is exactly what the\n" "> >patch does achieve!\n" @@ -175,15 +175,15 @@ "> >level will turn to max. brightness rather than off when selecting\n" "> >brightness level 0 (max. PWM duty cycle).\n" "> >\n" - "> >>Conversely, let's say duty_cycle = 255. In some cases this can mean\n" + "> >>Conversely, let's say duty_cycle == 255. In some cases this can mean\n" "> >>\"turn the brightness to the *lowest* setting\" i.e. *off*. Well your\n" "> >>logic just turned the backlight *on*.\n" "> >>\n" "> >OK. Let's try a sequence of brightness levels and duty cycles:\n" "> >For simplicity assume a range of brightness levels from 0..100, so\n" "> >that the 'brightness' value directly represents the duty cycle of the\n" - "> >PWM. So either: brightness = 0 => duty cycle = 0% => constant LOW\n" - "> >Or: brightnes = 0 => duty cycle = 100% => constant HIGH.\n" + "> >PWM. So either: brightness == 0 => duty cycle == 0% => constant LOW\n" + "> >Or: brightnes == 0 => duty cycle == 100% => constant HIGH.\n" "> >\n" "> >Normal range with current and patched code:\n" "> > brightness duty_cycle\n" @@ -220,7 +220,7 @@ "\n" "Look at this again:\n" "\n" - "> Let's say duty_cycle = 0. In some cases this can mean \"turn\n" + "> Let's say duty_cycle == 0. In some cases this can mean \"turn\n" "> brightness up to the *maximum*\", but with your new logic you just\n" "> turned the backlight *off*.\n" "\n" @@ -235,4 +235,4 @@ "Linaro.org \342\224\202 Open source software for ARM SoCs\n" Follow Linaro: Facebook | Twitter | Blog -a9ac4e56b812965fa4b289fcb08143a9cb40aaaa094f2c2f03f838748f460fcc +bf7575f5cd99a53b55a0f146e7e7c8c9dfff9797b109928ce8e65b820f275bbb
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.