Re: [RFC PATCH v3 2/2] pwm: imx: Configure output to GPIO in disabled state

2018-12-06 Thread Uwe Kleine-König
On Thu, Dec 06, 2018 at 03:37:55PM +, Vokáč Michal wrote: > On 6.12.2018 14:59, Uwe Kleine-König wrote: > > On Thu, Dec 06, 2018 at 01:41:31PM +, Vokáč Michal wrote: > >> +{ > >> + imx_chip->pinctrl = devm_pinctrl_get(>dev); > >> + if (IS_ERR(imx

Re: [RFC PATCH v3 2/2] pwm: imx: Configure output to GPIO in disabled state

2018-12-06 Thread Uwe Kleine-König
if (cstate.enabled) { > + dev_dbg(>dev, > + "PWM entered probe in enabled state\n"); > + pinctrl_select_state(imx->pinctrl, > + imx->pinctrl_pins_pwm); > + } else { > + pinctrl_select_state(imx->pinctrl, > + imx->pinctrl_pins_gpio); > + } > + } > + ISTR that there was a patch that implements get_state for imx. Is there a dependency on that one? Otherwise the state returned by pwm_get_state() might not be what is actually configured. Do you know if this is required for the old i.MX pwm, e.g. on i.MX21? I ask because of https://patchwork.ozlabs.org/patch/171/ Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

2018-12-05 Thread Uwe Kleine-König
On Wed, Dec 05, 2018 at 01:19:54PM +0100, Linus Walleij wrote: > On Mon, Dec 3, 2018 at 12:06 PM Uwe Kleine-König > wrote: > > On Mon, Dec 03, 2018 at 11:57:26AM +0100, Bartosz Golaszewski wrote: > > > > It used to live in the gpio-mockup driver and I generalized it

Re: [PATCH 2/2] gpio: mockup: use irq_sim_fire_edge()

2018-12-03 Thread Uwe Kleine-König
irqsim, priv->offset); > + edge = val == 0 ? IRQ_TYPE_EDGE_FALLING : IRQ_TYPE_EDGE_RISING; > + irq_sim_fire_edge(>irqsim, priv->offset, edge); If I write 0 twice into the debugfs file, does it fire two irqs or only one? I think it fires two but only one would be the right behaviour?! Best regards Uw

Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

2018-12-03 Thread Uwe Kleine-König
On Mon, Dec 03, 2018 at 11:57:26AM +0100, Bartosz Golaszewski wrote: > pon., 3 gru 2018 o 11:49 Uwe Kleine-König > napisał(a): > > > > On Mon, Dec 03, 2018 at 11:23:38AM +0100, Bartosz Golaszewski wrote: > > > niedz., 2 gru 2018 o 23:20 Bartosz Golaszewski napisał(a)

Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

2018-12-03 Thread Uwe Kleine-König
On Mon, Dec 03, 2018 at 11:23:38AM +0100, Bartosz Golaszewski wrote: > niedz., 2 gru 2018 o 23:20 Bartosz Golaszewski napisał(a): > > > > niedz., 2 gru 2018 o 22:56 Uwe Kleine-König > > napisał(a): > > > > > > Hello, > > > > > > On Thu, No

Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

2018-12-02 Thread Uwe Kleine-König
for the record: I objected the patch, Bartosz agrees to discuss further and but because this is too much detail the patch should now be applied anyhow to fix the test suite of an external project. This seems wrong to me. Best regards Uwe -- Pengutronix e.K. | Uwe

Re: [PATCH v6 1/9] ARM: dts: Reflect change of FSL QSPI driver and remove unused properties

2018-11-27 Thread Uwe Kleine-König
ument accordingly? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH v3 6/6] ARM: PWM: add allwinner sun8i R40/T3/V40 PWM support.

2018-11-27 Thread Uwe Kleine-König
Hello, On Mon, Nov 26, 2018 at 10:31:58PM +0100, Uwe Kleine-König wrote: > On Mon, Nov 26, 2018 at 12:23:19AM +0800, Hao Zhang wrote: > > The sun8i R40/T3/V40 PWM has 8 PWM channals and divides to 4 PWM pairs, > > each PWM pair built-in 1 clock module, 2 timer logic module and 1 &

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-26 Thread Uwe Kleine-König
Hallo Lothar, On Mon, Nov 26, 2018 at 10:11:16AM +0100, Lothar Waßmann wrote: > Uwe Kleine-König wrote: > > @Lothar: if Michal did something different than you expected, please > > tell us with a few more details. > > No, Michal's findings are in sync with wha

Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

2018-11-25 Thread Uwe Kleine-König
On Fri, Nov 23, 2018 at 04:59:46PM +0100, Bartosz Golaszewski wrote: > śr., 21 lis 2018 o 20:15 Uwe Kleine-König > napisał(a): > > > > Hello Bartosz, > > > > On Wed, Nov 21, 2018 at 05:34:32PM +0100, Bartosz Golaszewski wrote: > > > wt., 20 lis 2018

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-25 Thread Uwe Kleine-König
Hello Michal, On Fri, Nov 23, 2018 at 03:15:11PM +, Vokáč Michal wrote: > On 22.11.2018 20:03, Uwe Kleine-König wrote: > > On Thu, Nov 22, 2018 at 04:46:39PM +, Vokáč Michal wrote: > >> On 22.11.2018 17:23, Uwe Kleine-König wrote: > >>> So I'd expec

Re: [PATCH v2] pwm: kconfig: enable kona pwm to be built for cygnus arch

2018-11-23 Thread Uwe Kleine-König
Hello Clément, On Fri, Nov 23, 2018 at 10:31:18AM +0100, Clément Péron wrote: > On Thu, 22 Nov 2018 at 21:05, Uwe Kleine-König > wrote: > > Related to this driver I have a set of questions: If the disable > > callback completed, does the hardware still drive the

Re: [PATCH 2/3] serial: imx: unprepare console clocks on remove

2018-11-23 Thread Uwe Kleine-König
is called once, and if the console is on (say) ttymxc0 you don't want to unprepare the clocks if ttymxc3 gets unbound. So I think this cleanup must go into imx_uart_exit(). Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/3] serial: imx: fix error handling in console_setup

2018-11-23 Thread Uwe Kleine-König
+ b/drivers/tty/serial/imx.c > @@ -2068,7 +2068,7 @@ imx_uart_console_setup(struct console *co, char > *options) > > retval = clk_prepare(sport->clk_per); > if (retval) > - clk_disable_unprepare(sport->clk_ipg); > + clk_unprepare(spo

Re: [PATCH v2] pwm: kconfig: enable kona pwm to be built for cygnus arch

2018-11-22 Thread Uwe Kleine-König
US This looks good. As pointed out before the default is a bit strange and could include ARCH_BCM_MOBILE for symmetry. Anyhow: Acked-by: Uwe Kleine-König Related to this driver I have a set of questions: If the disable callback completed, does the hardware still drive the pin? If yes, would it

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-22 Thread Uwe Kleine-König
Hello Michal, On Thu, Nov 22, 2018 at 04:46:39PM +, Vokáč Michal wrote: > On 22.11.2018 17:23, Uwe Kleine-König wrote: > > On Thu, Nov 22, 2018 at 03:42:14PM +, Vokáč Michal wrote: > >> On 16.11.2018 09:25, Uwe Kleine-König wrote: > >>> On Fri, Nov 16, 20

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-22 Thread Uwe Kleine-König
Hello Michal, On Thu, Nov 22, 2018 at 03:42:14PM +, Vokáč Michal wrote: > On 16.11.2018 09:25, Uwe Kleine-König wrote: > > On Fri, Nov 16, 2018 at 08:34:30AM +0100, Lothar Waßmann wrote: > > > No. You can disable the output driver via pinctrl, so that only the > >

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-22 Thread Uwe Kleine-König
Hello Thierry, On Thu, Nov 22, 2018 at 04:03:38PM +0100, Thierry Reding wrote: > On Sun, Nov 18, 2018 at 09:08:15PM +0100, Uwe Kleine-König wrote: > > Thinking a bit about this it doesn't really matter for the consumer if > > the pin stays in the idle level because there is a pull

Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

2018-11-21 Thread Uwe Kleine-König
Hello Bartosz, On Wed, Nov 21, 2018 at 05:34:32PM +0100, Bartosz Golaszewski wrote: > wt., 20 lis 2018 o 18:17 Uwe Kleine-König > napisał(a): > > > > On Tue, Nov 20, 2018 at 02:40:31PM +0100, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > &g

Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()

2018-11-20 Thread Uwe Kleine-König
= >irqs[offset]; > + > + if (irq->enabled && (irq->edge & edge)) { > set_bit(offset, sim->work_ctx.pending); > irq_work_queue(>work_ctx.work); > } > } > -EXPORT_SYMBOL_GPL(irq_sim_fire); > +EXPORT_SYMBOL_GPL(irq_sim_fi

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-20 Thread Uwe Kleine-König
Hello Michal, On Tue, Nov 20, 2018 at 01:14:33PM +, Vokáč Michal wrote: > On 16.11.2018 10:51, Thierry Reding wrote: > > On Thu, Nov 15, 2018 at 09:37:33PM +0100, Uwe Kleine-König wrote: > >> On Thu, Nov 15, 2018 at 04:25:45PM +0100, Thierry Reding wrote: > > M

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-20 Thread Uwe Kleine-König
Hello, On Tue, Nov 20, 2018 at 09:35:47AM +0100, Linus Walleij wrote: > On Mon, Nov 19, 2018 at 9:32 AM Uwe Kleine-König > wrote: > > > To sumarize: When the pwm driver probes it is not yet clear if the idle > > state of the output pin is high or low. Even when t

Re: [PATCH v6 1/6] clk: Add of_clk_get_by_name_optional() function

2018-11-19 Thread Uwe Kleine-König
Hello Phil, On Mon, Nov 19, 2018 at 12:53:46PM +, Phil Edworthy wrote: > On 19 November 2018 10:46 Uwe Kleine-König wrote: > > On Mon, Nov 19, 2018 at 10:41:42AM +, Phil Edworthy wrote: > > > btw, do we need to add of_clk_get_by_name_optional()? I only added it >

Re: [PATCH v6 1/6] clk: Add of_clk_get_by_name_optional() function

2018-11-19 Thread Uwe Kleine-König
Hello Phil, On Mon, Nov 19, 2018 at 10:41:42AM +, Phil Edworthy wrote: > On 16 November 2018 16:11 Uwe Kleine-König wrote: > > On Fri, Nov 16, 2018 at 05:01:28PM +0100, Uwe Kleine-König wrote: > > > Other than that I think the patch is fine > > > > Thinking a

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-19 Thread Uwe Kleine-König
Hello, On Sun, Nov 18, 2018 at 09:08:15PM +0100, Uwe Kleine-König wrote: > On Fri, Nov 16, 2018 at 01:24:45PM +0100, Thierry Reding wrote: > > On Fri, Nov 16, 2018 at 11:39:29AM +0100, Uwe Kleine-König wrote: > > > Also note that you don't include the poor souls where there is

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-19 Thread Uwe Kleine-König
timate. Thanks for your feedback. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-18 Thread Uwe Kleine-König
Hello Thierry, On Fri, Nov 16, 2018 at 01:24:45PM +0100, Thierry Reding wrote: > On Fri, Nov 16, 2018 at 11:39:29AM +0100, Uwe Kleine-König wrote: > > On Fri, Nov 16, 2018 at 10:51:24AM +0100, Thierry Reding wrote: > > > On Thu, Nov 15, 2018 at 09:37:33PM +0100, Uwe

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-18 Thread Uwe Kleine-König
Hello Lothar, On Fri, Nov 16, 2018 at 12:56:33PM +0100, Lothar Waßmann wrote: > Uwe Kleine-König wrote: > > On Fri, Nov 16, 2018 at 10:51:24AM +0100, Thierry Reding wrote: > > > On Thu, Nov 15, 2018 at 09:37:33PM +0100, Uwe Kleine-König wrote: > > > > On Thu, No

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-16 Thread Uwe Kleine-König
Hello Thierry, On Fri, Nov 16, 2018 at 10:51:24AM +0100, Thierry Reding wrote: > On Thu, Nov 15, 2018 at 09:37:33PM +0100, Uwe Kleine-König wrote: > > On Thu, Nov 15, 2018 at 04:25:45PM +0100, Thierry Reding wrote: > > > On Wed, Nov 14, 2018 at 10:51:20PM +0100, Uwe

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-16 Thread Uwe Kleine-König
On Fri, Nov 16, 2018 at 08:34:30AM +0100, Lothar Waßmann wrote: > Uwe Kleine-König wrote: > > > Hello Thierry, > > > > On Thu, Nov 15, 2018 at 04:25:45PM +0100, Thierry Reding wrote: > > > On Wed, Nov 14, 2018 at 10:51:20PM +0100, Uwe Kleine-König wrote: >

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-15 Thread Uwe Kleine-König
The usual policy is: If the things specified in the dt are wrong or incomplete, it's ok to fail however you like. So from a correctness POV I think the change is fine. I don't know about the mips details that John pointed out in a followup to this mail though. Best regards Uwe -- Pengut

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-15 Thread Uwe Kleine-König
Hello Thierry, On Thu, Nov 15, 2018 at 04:25:45PM +0100, Thierry Reding wrote: > On Wed, Nov 14, 2018 at 10:51:20PM +0100, Uwe Kleine-König wrote: > > On Wed, Nov 14, 2018 at 12:34:49PM +0100, Thierry Reding wrote: > > > On Fri, Nov 09, 2018 at 05:55:55PM +0100, Uwe

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-14 Thread Uwe Kleine-König
Hello Thierry, On Wed, Nov 14, 2018 at 12:34:49PM +0100, Thierry Reding wrote: > On Fri, Nov 09, 2018 at 05:55:55PM +0100, Uwe Kleine-König wrote: > > On Fri, Nov 09, 2018 at 02:24:42PM +, Vokáč Michal wrote: > > > On 8.11.2018 20:18, Uwe Kleine-König wrote: > >

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-14 Thread Uwe Kleine-König
Hello Michal, On Fri, Nov 09, 2018 at 05:55:55PM +0100, Uwe Kleine-König wrote: > On Fri, Nov 09, 2018 at 02:24:42PM +, Vokáč Michal wrote: > > On 8.11.2018 20:18, Uwe Kleine-König wrote: > > > On Thu, Nov 08, 2018 at 03:21:44PM +, Vokáč Michal wr

Re: [resend PATCH 3/3] dt-bindings: pwm: update bindings for MT7629 SoC

2018-11-13 Thread Uwe Kleine-König
roperties" to match what is implemented in patch 1 of this series. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-13 Thread Uwe Kleine-König
L instead of ERR_PTR(-ENODEV). Then the above would simplify to: pc->clks[i] = devm_clk_get_optional(>dev, mtk_pwm_clk_name[i]); if (IS_ERR(pc->clks[i]) { if (PTR_ERR(pc->clks[i]) == -EPROBE_DEFER) dev_err(...); return PTR_ERR(pc->clks[i]); } (added the clk people to Cc for this question). Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/3] gpio: mockup: fix indicated direction

2018-11-12 Thread Uwe Kleine-König
wrong and I'd do both: Modify the mockup driver to start with direction=input and modify the tests to not expect this. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/3] gpio: mockup: fix indicated direction

2018-11-11 Thread Uwe Kleine-König
On Fri, Nov 09, 2018 at 06:23:01PM +0100, Bartosz Golaszewski wrote: > pt., 9 lis 2018 o 18:03 Uwe Kleine-König > napisał(a): > > > > Hello Bartosz, > > > > On Fri, Nov 09, 2018 at 04:24:10PM +0100, Bartosz Golaszewski wrote: > > > pt., 9 lis 2018

Re: [PATCH 1/3] gpio: mockup: fix indicated direction

2018-11-09 Thread Uwe Kleine-König
Hello Bartosz, On Fri, Nov 09, 2018 at 04:24:10PM +0100, Bartosz Golaszewski wrote: > pt., 9 lis 2018 o 15:39 Uwe Kleine-König > napisał(a): > > On Fri, Nov 09, 2018 at 02:53:16PM +0100, Bartosz Golaszewski wrote: > > > pt., 9 lis 2018 o 14:10 Uwe Kleine-König > > &

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-09 Thread Uwe Kleine-König
On Fri, Nov 09, 2018 at 02:24:42PM +, Vokáč Michal wrote: > On 8.11.2018 20:18, Uwe Kleine-König wrote: > > On Thu, Nov 08, 2018 at 03:21:44PM +, Vokáč Michal wrote: > >> Hi Uwe, > >> > >> On 7.11.2018 16:01, Uwe Kleine-König wrote: > >>>&

Re: [PATCH 1/3] gpio: mockup: fix indicated direction

2018-11-09 Thread Uwe Kleine-König
On Fri, Nov 09, 2018 at 02:53:16PM +0100, Bartosz Golaszewski wrote: > pt., 9 lis 2018 o 14:10 Uwe Kleine-König > napisał(a): > > > > Hello, > > > > On Fri, Nov 09, 2018 at 01:24:36PM +0100, Bartosz Golaszewski wrote: > > > pt., 9 lis 2018

Re: [PATCH 1/3] gpio: mockup: fix indicated direction

2018-11-09 Thread Uwe Kleine-König
Hello, On Fri, Nov 09, 2018 at 01:24:36PM +0100, Bartosz Golaszewski wrote: > pt., 9 lis 2018 o 12:54 Uwe Kleine-König > napisał(a): > > On Fri, Nov 09, 2018 at 12:13:44PM +0100, Bartosz Golaszewski wrote: > > > czw., 8 lis 2018 o 21:35 Uwe Kleine-König > > > napi

Re: [PATCH 1/3] gpio: mockup: fix indicated direction

2018-11-09 Thread Uwe Kleine-König
Hello Bartosz, On Fri, Nov 09, 2018 at 12:13:44PM +0100, Bartosz Golaszewski wrote: > czw., 8 lis 2018 o 21:35 Uwe Kleine-König > napisał(a): > > On Thu, Nov 08, 2018 at 05:52:53PM +0100, Bartosz Golaszewski wrote: > > > Commit 3edfb7bd76bd ("gpiolib: S

Re: [PATCH 1/2] pwm: kconfig: enable kona pwm to be built for cygnus arch

2018-11-09 Thread Uwe Kleine-König
7 Nov 2018 at 17:48, Scott Branden > > > wrote: > > > > > > > > > > > > On 2018-11-07 8:12 a.m., Uwe Kleine-König wrote: > > > > > On Wed, Nov 07, 2018 at 10:36:12AM +0100, Clément Péron wrote: > > > > >> The Cygnu

Re: [PATCH] irq/irq_sim: add locking

2018-11-08 Thread Uwe Kleine-König
Hello, On Thu, Nov 08, 2018 at 09:55:02PM +0100, Bartosz Golaszewski wrote: > czw., 8 lis 2018 o 20:41 Uwe Kleine-König > napisał(a): > > > @@ -142,10 +143,14 @@ EXPORT_SYMBOL_GPL(devm_irq_sim_init); > > > */ > > > void irq_sim_fire(struct

Re: [PATCH 2/3] gpio: mockup: add locking

2018-11-08 Thread Uwe Kleine-König
On Thu, Nov 08, 2018 at 05:52:54PM +0100, Bartosz Golaszewski wrote: > While no user reported any race condition problems with gpio-mockup, > let's be on the safe side and use a mutex when performing any changes > on the dummy chip structures. > > Suggested-by: Uwe Kleine-Köni

Re: [PATCH 3/3] gpio: mockup: implement get_multiple()

2018-11-08 Thread Uwe Kleine-König
On Thu, Nov 08, 2018 at 05:52:55PM +0100, Bartosz Golaszewski wrote: > We already support set_multiple(). Implement get_multiple() as well. > > Signed-off-by: Bartosz Golaszewski Acked-by: Uwe Kleine-König -- Pengutronix e.K. | Uwe Kle

Re: [PATCH 1/3] gpio: mockup: fix indicated direction

2018-11-08 Thread Uwe Kleine-König
he indicated commit only changed what was shown in debugfs, but didn't touch the actual direction of a GPIO, doesn't it? If someone called gpiod_get_direction before it would have returned "output", too, unless I miss something. Best regards Uwe -- Pengutronix e.K.

Re: [PATCH] irq/irq_sim: add locking

2018-11-08 Thread Uwe Kleine-König
Hello Bartosz, On Thu, Nov 08, 2018 at 05:47:48PM +0100, Bartosz Golaszewski wrote: > Two threads can try to fire the irq_sim with different offsets and will > end up fighting for the irq_work asignment. To fix it: add a mutex and > lock it before firing. > > Suggested-by: U

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-08 Thread Uwe Kleine-König
On Thu, Nov 08, 2018 at 03:21:44PM +, Vokáč Michal wrote: > Hi Uwe, > > On 7.11.2018 16:01, Uwe Kleine-König wrote: > >> Interesting idea. I just wonder why nobody else did not come up with such > >> a simple solution before. > > > > I think I mentioned

Re: [PATCH 2/2] pwm: bcm-kona: apply pwm settings on enable

2018-11-08 Thread Uwe Kleine-König
Hello, adding Tim Kryger as the initial author of the bcm-kona driver to Cc:. Maybe he can shed some light to the questions below? On Thu, Nov 08, 2018 at 11:47:17AM +0100, Clément Péron wrote: > On Wed, 7 Nov 2018 at 17:29, Uwe Kleine-König > wrote: > > On Wed, Nov 07, 2018 at 10:3

Re: [PATCH] scripts/spdxcheck: make python3 compliant

2018-11-08 Thread Uwe Kleine-König
Hello, On Thu, Nov 08, 2018 at 07:22:00AM +0100, Uwe Kleine-König wrote: > On Wed, Nov 07, 2018 at 03:32:51PM -0800, Andrew Morton wrote: > > On Tue, 23 Oct 2018 09:08:02 +0200 Uwe Kleine-König > > wrote: > > > > > Without this change the following hap

Re: [PATCH] scripts/spdxcheck: make python3 compliant

2018-11-07 Thread Uwe Kleine-König
Hello Andrew, On Wed, Nov 07, 2018 at 03:32:51PM -0800, Andrew Morton wrote: > On Tue, 23 Oct 2018 09:08:02 +0200 Uwe Kleine-König > wrote: > > > Without this change the following happens when using Python3 (3.6.6): > > > > $ echo "GPL-2.0" | python

Re: [PATCH 2/2] pwm: bcm-kona: apply pwm settings on enable

2018-11-07 Thread Uwe Kleine-König
in .enable ensure that the hardware is programmed with the parameters from pwm->state. (But converting to the atomic API is the better approach.) Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/2] pwm: kconfig: enable kona pwm to be built for cygnus arch

2018-11-07 Thread Uwe Kleine-König
ant to consider depends on ARCH_BCM_MOBILE || ARCH_BCM_CYGNUS || COMPILE_TEST Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-07 Thread Uwe Kleine-König
Hello Michal, On Wed, Nov 07, 2018 at 01:32:10PM +, Vokáč Michal wrote: > On 7.11.2018 10:33, Uwe Kleine-König wrote: > > Hello Michal, > > > > just to state it more explicitly, I think the following patch (not even > > compile tested) is much preferable over your

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-11-07 Thread Uwe Kleine-König
you want to address with the pinctrl stuff. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: linux-next: build warning after merge of the gpio tree

2018-11-05 Thread Uwe Kleine-König
use I thought I'd have to resent this patch and then forgot as you applied yourself. Sorry for that, the obvious resolution is to drop devm_gpio_chip_match(). Feel free to squash that into 48207d7595d2. If your branch is already stable I can provide a patch for that. Thanks Uwe -- Pengutronix e.K.

Re: [PATCH] ARM: debug: enable UART1 for socfpga Cyclone5

2018-10-24 Thread Uwe Kleine-König
not say having to upstream the board is a sensible precondition for such a patch. One of the arguments for moving ARM to dt was that this allows to separate the machine specifics from the code. So I'd say if Clément has a need, this is a good enough reason to take this patch. Just my 0.02 €, Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH] ARM: dts: fix imx7d boot spi dma setup error

2018-10-23 Thread Uwe Kleine-König
MA, falling back to PIO So IMHO this should be downgraded from dev_err to dev_info and reworded. Maybe even try DMA-setup on devices where it is known to fail and don't emit a message on -ENODEV at all. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König

[PATCH] scripts/spdxcheck: make python3 compliant

2018-10-23 Thread Uwe Kleine-König
s the line is already a string, there is no need to decode it and the line can be dropped. Signed-off-by: Uwe Kleine-König --- scripts/spdxcheck.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py index 839e190bbd7a..5056fb3b897d 100755 --- a/scripts/spdxcheck

Re: [PATCH RFC] err.h: document that PTR_ERR should only be used if IS_ERR returns true

2018-10-16 Thread Uwe Kleine-König
R(-ENOENT)) ? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH RFC] err.h: document that PTR_ERR should only be used if IS_ERR returns true

2018-10-15 Thread Uwe Kleine-König
Hello, On 10/15/2018 11:37 AM, Alessandro Rubini wrote: >> during a review I claimed that PTR_ERR should only be used if IS_ERR was >> already checked. The rationale isn't obvious though and Thierry >> suggested to keep the code as is and not introduce an IS_ERR check. > > The rationale is the

[PATCH RFC] err.h: document that PTR_ERR should only be used if IS_ERR returns true

2018-10-14 Thread Uwe Kleine-König
I have no idea about the rationale, but that's what LDD3 recommends. Signed-off-by: Uwe Kleine-König --- Hello, during a review I claimed that PTR_ERR should only be used if IS_ERR was already checked. The rationale isn't obvious though and Thierry suggested to keep the code

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-10-14 Thread Uwe Kleine-König
Hello, On Fri, Oct 12, 2018 at 06:08:54PM +0200, Uwe Kleine-König wrote: > > >> +if (PTR_ERR(imx_chip->pwm_gpiod) == -EPROBE_DEFER) { > > > > > > You must not use PTR_ERR on a value that might not contain an error > > > pointer. > > >

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-10-12 Thread Uwe Kleine-König
Hello, On Fri, Oct 12, 2018 at 03:04:48PM +, Vokáč Michal wrote: > On 12.10.2018 10:57, Uwe Kleine-König wrote: > > On Wed, Oct 10, 2018 at 09:33:26AM +, Vokáč Michal wrote: > >> Normally the PWM output is held LOW when PWM is disabled. This can cause > >>

Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state

2018-10-12 Thread Uwe Kleine-König
Hello, On Wed, Oct 10, 2018 at 09:33:26AM +, Vokáč Michal wrote: > Normally the PWM output is held LOW when PWM is disabled. This can cause > problems when inverted PWM signal polarity is needed. With this behavior > the connected circuit is fed by 100% duty cycle instead of being shut-off. >

Re: [PATCH] tty:serial:imx: use spin_lock instead of spin_lock_irqsave in isr

2018-10-01 Thread Uwe Kleine-König
It's not as optimal as it could be though, yes. The change is fine, Acked-by: Uwe Kleine-König -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/2] clocksource/drivers: Unify the names to timer-* format

2018-09-24 Thread Uwe Kleine-König
On Mon, Sep 24, 2018 at 08:31:26AM +0200, Daniel Lezcano wrote: > On 24/09/2018 08:28, Uwe Kleine-König wrote: > > On Mon, Sep 24, 2018 at 06:15:17AM +0200, Daniel Lezcano wrote: > >> In order to make some housekeeping in the directory, this patch renames > >> dr

Re: [PATCH 1/2] clocksource/drivers: Unify the names to timer-* format

2018-09-24 Thread Uwe Kleine-König
--- > drivers/clocksource/vt8500_timer.c| 168 - > drivers/clocksource/zevio-timer.c | 218 > 28 files changed, 3429 insertions(+), 3429 deletions(-) Wow, with git format-patch -M this should look much smaller and so easier to review. Best rega

[PATCH] serial: imx: restore handshaking irq for imx1

2018-09-20 Thread Uwe Kleine-König
Back in 2015 when irda was dropped from the driver imx1 was broken. This change reintroduces the support for the third interrupt of the UART. Fixes: afe9cbb1a6ad ("serial: imx: drop support for IRDA") Signed-off-by: Uwe Kleine-König --- drivers/tty/serial/imx.c | 8 1 file

Re: [PATCH v1] tty: serial: imx: enable IDDMAEN for the last tail data

2018-09-20 Thread Uwe Kleine-König
UCR4); > + > imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); > > sport->dma_is_enabled = 0; > -- > 2.7.4 > > -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH -next] serial: imx: remove set but not used variable 'rtsirq'

2018-09-20 Thread Uwe Kleine-König
return ret; + } } else { ret = devm_request_irq(>dev, rxirq, imx_uart_int, 0, dev_name(>dev), sport); Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

[PATCH] sched/debug: use symbolic names for task state constants

2018-09-05 Thread Uwe Kleine-König
for an outsider. Signed-off-by: Uwe Kleine-König --- include/trace/events/sched.h | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 0be866c91f62..f07b270d4fc4 100644 --- a/include/trace/events/sched.h +++ b

Re: [PATCH V2 1/2] tty: serial: imx: add lock for registers save/restore

2018-09-04 Thread Uwe Kleine-König
ial/imx.c b/drivers/tty/serial/imx.c > index 239c0fa..c15332d 100644 Acked-by: Uwe Kleine-König Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH V2 2/2] tty: serial: imx: add pinctrl sleep/default mode switch for suspend

2018-09-04 Thread Uwe Kleine-König
mux settings are correct after resume. > > Signed-off-by: Anson Huang Acked-by: Uwe Kleine-König Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 2/2] tty: serial: imx: add pinctrl sleep/default mode switch for suspend

2018-09-04 Thread Uwe Kleine-König
settings are > correct after resume. Otherwise the change looks fine. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/2] tty: serial: imx: add lock for registers save/restore

2018-09-04 Thread Uwe Kleine-König
UBMR); > sport->saved_reg[9] = imx_uart_readl(sport, IMX21_UTS); > sport->context_saved = true; > + spin_unlock_irqrestore(>port.lock, flags); > } > > static void imx_uart_enable_wakeup(struct imx_port *sport, bool on) Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH v2] serial: mxs-auart: Fix potential infinite loop

2018-08-22 Thread Uwe Kleine-König
unsigned. >*/ > - while (err && (--i >= 0)) > + while (err && (i-- > 0)) > if (irq[i] >= 0) > free_irq(irq[i], s); I wouldn't have added the comment, but the code change is correct. Acked-by: Uwe Klein

Re: [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support

2018-08-16 Thread Uwe Kleine-König
able to me. Acked-by: Uwe Kleine-König Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH v3 1/3] i2c: imx: Fix race condition in dma read

2018-08-16 Thread Uwe Kleine-König
n >= DMA_THRESHOLD && !block_data; and then simplify the two conditions to just "use_dma". With this changed you can add my Ack. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH v3 2/3] i2c: imx: Simplify stopped state tracking

2018-08-16 Thread Uwe Kleine-König
some errors cause the stopped state to be left in > incorrect state in i2c_imx_stop(), i2c_imx_dma_read(), i2c_imx_read() and > i2c_imx_xfer(). > > Signed-off-by: Esben Haabendal Acked-by: Uwe Kleine-König -- Pengutronix e.K. | Uwe Kleine-König

Re: Turris Omnia firmware possibilities [Was: Re: led: hw-trigger, global brightness and multi-colored leds]

2018-08-14 Thread Uwe Kleine-König
Hello Tomas, On 05/25/2018 04:02 PM, Tomas Hlavacek wrote: >> Talking about firmware, I wonder if there is firmware supported needed >> to solve >> https://wiki.debian.org/InstallingDebianOn/TurrisOmnia#Power_Management >> . Didn't look into that deeply yet and probably not high prio given that

Re: [PATCH v2 3/4] i2c: imx: Simplify stopped state tracking

2018-08-10 Thread Uwe Kleine-König
Hello Esben, On Fri, Aug 10, 2018 at 11:25:34AM +0200, Esben Haabendal wrote: > Uwe Kleine-König writes: > > Currently you have: > > > > if (for_busy && (temp & I2SR_IBB)) { > > i2c_imx->stopped = 0; > > break; > >

Re: [PATCH v2 3/4] i2c: imx: Simplify stopped state tracking

2018-08-09 Thread Uwe Kleine-König
On Thu, Aug 09, 2018 at 02:06:43PM +0200, Esben Haabendal wrote: > Uwe Kleine-König writes: > > > On Mon, Jul 09, 2018 at 11:43:03AM +0200, Esben Haabendal wrote: > >> From: Esben Haabendal > >> > >> Always update the stopped state when busy status ha

Re: [PATCH v2 4/4] arm: dts: ls1021a: Enable I2C DMA support

2018-07-24 Thread Uwe Kleine-König
8 @@ > interrupts = ; > clock-names = "i2c"; > clocks = < 4 1>; > + dma-names = "tx", "rx"; > + dmas = < 1 35>, < 1

Re: [PATCH v2 3/4] i2c: imx: Simplify stopped state tracking

2018-07-24 Thread Uwe Kleine-König
p;= ~I2CR_DMAEN; > @@ -569,7 +572,6 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx) > > if (!i2c_imx->stopped) { > i2c_imx_bus_busy(i2c_imx, 0); > - i2c_imx->stopped = 1; > } The braces can go away here. > > /* Disable I2C controller */ Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH v2 2/4] i2c: imx: Fix race condition in dma read

2018-07-24 Thread Uwe Kleine-König
& !block_data) temp |= I2CR_DMAEN; when moved before up one line. I don't find documentation for the LS processors where this register is described though (and the imx family doesn't seem to support DMA for i2c). Other than that this looks reasonable and warrants a

Re: [PATCH] kbuild: suppress warnings from 'getconf LFS_*'

2018-07-12 Thread Uwe Kleine-König
meter `LFS_LIBS' > > Fixes: d7f14c66c273 ("kbuild: Enable Large File Support for hostprogs") > Reported-by: Chen Feng > Cc: Uwe Kleine-König > Signed-off-by: Masahiro Yamada Which is the system that doesn't know about LFS_* and you care about? Irrespective of that: A

Re: [PATCH 2/4] i2c: imx: Fix race condition in dma read

2018-07-05 Thread Uwe Kleine-König
ead, and no DMA request is generated > to kickstart the DMA read, and a timeout happens after DMA_TIMEOUT (1 sec). > > Fixed by setting the DMAEN bit before the dummy read. Does this fix the problem or just narrow the race window? Best regards Uwe -- Pengutronix e.K.

Re: [PATCH] gpiolib: Defer on non-DT find_chip_by_name() failure

2018-07-04 Thread Uwe Kleine-König
FER) { return -EPROBE_DEFER; } else if (IS_ERR(rinfo->sda_gpiod) || IS_ERR(rinfo->scl_gpiod) || IS_ERR(i2c_imx->pinctrl_pins_default) || IS_ERR(i2c_imx->pinctrl_pins_gpio)) { dev_dbg(>dev, "recovery information incomplete\n"); return 0; } So if a patch changes devm_gpiod_get() to return -EPROBE_DEFER in more cases that doesn't seem to hurt. Moreover TTBOMK this driver should only be used by dt-machines today such that changing gpio* for non-DT users shouldn't affect it. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH 1/4] i2c: imx: Fix reinit_completion() use

2018-07-04 Thread Uwe Kleine-König
ter complete() and before s/compleition/completion/ > wait_for_completion_timeout(). Is this a theoretical problem, or did it trigger on your side? > Signed-off-by: Esben Haabendal Fixes: ce1a78840ff7 ("i2c: imx: add DMA support for freescale i2c driver") Reviewed-by: Uwe Kleine-

Re: [PATCH] siox: don't create a thread without starting it

2018-07-02 Thread Uwe Kleine-König
Hello, On Mon, Jul 02, 2018 at 09:34:04AM +1000, Stephen Rothwell wrote: > On Fri, 29 Jun 2018 09:38:58 +0200 Uwe Kleine-König > wrote: > > > > On Thu, Jun 28, 2018 at 09:57:42AM +0200, Uwe Kleine-König wrote: > > > Greg, you applied the initial patches creating drive

Re: [PATCH] siox: don't create a thread without starting it

2018-06-29 Thread Uwe Kleine-König
Hello Greg, Cc -= Peter Zijlstra Cc += Stephen Rothwell On Thu, Jun 28, 2018 at 09:57:42AM +0200, Uwe Kleine-König wrote: > Greg, you applied the initial patches creating drivers/siox. I assume > you will continue to apply siox patches and tell if I should search a > different path for

Re: [PATCH] siox: don't create a thread without starting it

2018-06-28 Thread Uwe Kleine-König
. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ |

Re: [PATCH] RFC: siox: don't create a thread without starting it

2018-06-28 Thread Uwe Kleine-König
Hello Peter, On Tue, Jun 26, 2018 at 09:38:41AM +0200, Peter Zijlstra wrote: > On Mon, Jun 25, 2018 at 09:21:21PM +0200, Uwe Kleine-König wrote: > > > I don't think so, that patch has an issue with INTERRUPTIBLE, but IDLE > > > very much doesn't allow signals like INTERRUPT

[PATCH] siox: don't create a thread without starting it

2018-06-28 Thread Uwe Kleine-König
in state TASK_IDLE which doesn't trigger the above warning. As siox_poll_thread() uses some variables of the device the initialisation of these is moved before thread creation. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Uwe Kleine-König --- Hello, this is the same patch as before

Re: [PATCH v5 1/7] tty: serial: imx: correct dma cookie status

2018-06-26 Thread Uwe Kleine-König
; > Signed-off-by: Robin Gong Looks wrong (because of tx_status vs rx_cookie), but is right nevertheless I think: Acked-by: Uwe Kleine-König Thanks Uwe > --- > drivers/tty/serial/imx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial

Re: [PATCH] RFC: siox: don't create a thread without starting it

2018-06-25 Thread Uwe Kleine-König
Hello Peter, On Mon, Jun 25, 2018 at 02:51:05PM +0200, Peter Zijlstra wrote: > On Mon, Jun 25, 2018 at 12:20:56PM +0200, Uwe Kleine-König wrote: > > when I just boot without any other siox-related action. So the kthread > > (created > > in drivers/siox/siox-core.c

  1   2   3   4   5   6   7   8   9   10   >