Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1750836ybg; Sat, 19 Oct 2019 01:42:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0JoVGQmvMYAHj4rae7LC8/V0a2esShYDLghKG7zb4TKJ9M4hkxvcKi+fmV8xMgLS9u7lJ X-Received: by 2002:aa7:c410:: with SMTP id j16mr14162550edq.271.1571474567229; Sat, 19 Oct 2019 01:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571474567; cv=none; d=google.com; s=arc-20160816; b=pAEKIIMVRYNf7FKaocyKtAsuMct4RaPlK/Rixp+oN31qVsBM7KBrmYv5g6nlB8PXTR oCCGJGb891ycYN7VKwHatfhfEsRMulIPj754MsmmEjrOgUBXaCilJVVlirj3Xjvpq+tX gAeKxJFsLOm7Z564AGgBBMn1sFLtD4SVTAFDc7Dl8AXi0w9wYpMwIU8NizA6DDzAwXyL /l+380NgpRlFYtJF6U/VZ/rLX2iTL0d6B6m2yGIU7VBdnoL7Ie5TJ04uBOjbvVLymg1z i7E4zL0rXfvMNZcffeM6RpQsOG8/83UvMifFZ1rFC2SHhSpChu13hmdrspqqAIaaBJ0u Gi9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9uIYAnyPMezy1SrLVChvjUvSTT25CSaPRKsdjVZO6n8=; b=ROTyTugbpD2BAnHpNgTlLOufkfE60TihoGNfVj/kCNcckyYUqg2/ebmvWFj6aOyM2Y pxRhYMici5kF0DmaeSKn3i2u+eQokFTyCPu6cZze37gjb0zIk9mY3vmPDl+jRtrbWCTa tknqaWAWylNY1bfMXA+iklr+fnx4M0Q6r++HWYtpPZIQu1sjRUJSySutm0afFQyc2k5r I0lkQlFZuIiyRgYGh63dU80mnIHT6f/hG8MoRv9FLWWr8A0aNNTU19ErUEMz40nnoX7a vVtRDFHW3IWy1L7y+m+idrcKAXDEbjCYDMl2ZBHwECf+MJ9GtoG0SsmyV8O4yR+b30bF EaCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=RsS1qicP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19si5022685edo.172.2019.10.19.01.42.24; Sat, 19 Oct 2019 01:42:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=RsS1qicP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394793AbfJRQUc (ORCPT + 99 others); Fri, 18 Oct 2019 12:20:32 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:45958 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390022AbfJRQUb (ORCPT ); Fri, 18 Oct 2019 12:20:31 -0400 Received: by mail-il1-f195.google.com with SMTP id u1so6031079ilq.12 for ; Fri, 18 Oct 2019 09:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9uIYAnyPMezy1SrLVChvjUvSTT25CSaPRKsdjVZO6n8=; b=RsS1qicPZcnkl76YmnbfWfB4DsiuiCLUqloFqkV4cKo1n8DFJo7UEQSSDFodJSbKB/ aBWZqVCPZgMDcLDXyYzENWxYIXywuatRXqle5E7LpooPoQQUBy7bYET/lR3hCkblPVpQ lRCxDCweDqgN5VH3+jmycEAt4tkhNiTGcj63IOj6HoqYIOC+FHhzbw0j2Z6Q6PcheRlq V05ZlaVDqncElnNNeR/8BJBUr0rrldkoPBjEym9DYsl1rkcPeHcDWbU59h32Cz6ffBHn hRdElR9UrqvDGkKzkyMvLFvQ1KF9n7QBf9pfXR5M4kaxLzPEox6QLi5JDuA66WL4yGC9 X2Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9uIYAnyPMezy1SrLVChvjUvSTT25CSaPRKsdjVZO6n8=; b=JSNvTQvDFXgrKIPqo5SIN78XHx/XRxzIwxseYPp9UFEQ7B1grTyYX0ulJxQnoz+8CW uV2Bjn7h1JS+uM6dSeHRG/VUqMKn1Ge9lYYDgFLlJkeZn2GLlIcY1F0+uGHulDMAF5pM o3A4nn8G+k6L2qzzI2VZupEkf5U9bR92ali6sy5CrihB0qeb8+iCq95oj90acajdmEHc g0cJUnFIzJPxbTvYIgixvntgpqDe8lvcpgw8YdDtQHsAZvlWM8fsdmOpmgY8+UYvtM8h jGHIIK8/JNhiMPCc/LfPY0RfgsKpG8amI4pJ4bKDTjkPOwfBo33GdZoCpUmyojYqeWBs IMOw== X-Gm-Message-State: APjAAAVApKgeaaGh2/VhOQrEfwCxrBpt60smzKB/BnCz52Mt420udJpM xgZK2wa0WwtKFHPbjLThoLUH8GPnmrHhgAqRVgOChw== X-Received: by 2002:a92:410c:: with SMTP id o12mr11498464ila.287.1571415630625; Fri, 18 Oct 2019 09:20:30 -0700 (PDT) MIME-Version: 1.0 References: <20191007033200.13443-1-brgl@bgdev.pl> <20191014081220.GK4545@dell> <20191016130536.222vsi5whkoy6vzo@uno.localdomain> <20191017072550.GK4365@dell> <20191018150426.7w5q55nhkiqbqhuk@uno.localdomain> In-Reply-To: <20191018150426.7w5q55nhkiqbqhuk@uno.localdomain> From: Bartosz Golaszewski Date: Fri, 18 Oct 2019 18:20:19 +0200 Message-ID: Subject: Re: [PATCH v5 0/7] backlight: gpio: simplify the driver To: Jacopo Mondi Cc: Lee Jones , Linus Walleij , Yoshinori Sato , Rich Felker , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , Andy Shevchenko , Linux-sh list , "linux-kernel@vger.kernel.org" , "open list:DRM PANEL DRIVERS" , Linux Fbdev development list , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pt., 18 pa=C5=BA 2019 o 17:02 Jacopo Mondi napisa=C5=82= (a): > > Hi, > > On Thu, Oct 17, 2019 at 08:25:50AM +0100, Lee Jones wrote: > > On Wed, 16 Oct 2019, Jacopo Mondi wrote: > > > > > Hi, sorry for not having replied earlier > > > > > > On Wed, Oct 16, 2019 at 02:56:57PM +0200, Linus Walleij wrote: > > > > On Mon, Oct 14, 2019 at 10:12 AM Lee Jones w= rote: > > > > > > > > > > arch/sh/boards/mach-ecovec24/setup.c | 33 ++++-- > > > > > > > > > > I guess we're just waiting for the SH Acks now? > > > > > > > > The one maintainer with this board is probably overloaded. > > > > > > > > I would say just apply it, it can't hold back the entire series. > > > > > > I've been able to resurect the Ecovec, and I've also been given a cop= y > > > of its schematics file a few weeks ago. > > > > > > It's in my TODO list to test this series but I didn't manage to find > > > time. If I pinky promise I get back to you before end of the week, > > > could you wait for me ? :) > > Finally had some time to spend on this. > > As I've reported to Bartosz, this version does not work on Ecovec out > of the box, as the GPIO line connected to the backlight needs to be > configured to work in output mode before registering the backlight > device. > > With this simple change: > > $ git diff > diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-e= covec24/setup.c > index dd427bac5cde..eec6e805c3ed 100644 > --- a/arch/sh/boards/mach-ecovec24/setup.c > +++ b/arch/sh/boards/mach-ecovec24/setup.c > @@ -1473,6 +1473,7 @@ static int __init arch_setup(void) > #endif > #endif > > + gpio_direction_output(GPIO_PTR1, 1); This is a hack actually. The problem lies with the gpio backlight driver - it should really set the mode to output, not leave it as is. If there's no good reason to keep it as it is now, I'll add another patch to the series that moves the call to devm_gpiod_get() to where we've already determined the initial value in probe() and pass an appropriate GPIOD_OUT_HIGH/LOW flag. Bart > gpiod_add_lookup_table(&gpio_backlight_lookup); > gpio_backlight_device =3D platform_device_register_full( > &gpio_backlight_device_info); > > I can now control the gpio through the backlight interface. > > So please add this bit on top of next iteration and add my: > Tested-by: Jacopo Mondi > > Thanks and sorry for the long time it took! > > > > > Yes, no problem. > > > > -- > > Lee Jones [=E6=9D=8E=E7=90=BC=E6=96=AF] > > Linaro Services Technical Lead > > Linaro.org =E2=94=82 Open source software for ARM SoCs > > Follow Linaro: Facebook | Twitter | Blog