Received: by 10.213.65.68 with SMTP id h4csp252578imn; Fri, 16 Mar 2018 01:51:48 -0700 (PDT) X-Google-Smtp-Source: AG47ELsBczZzT7Bi6v9MGRyRkB0rjOgWkKMxJxTXfa7gZuFwxScFDxe4Trh6vLQcaIUHMU//5uN/ X-Received: by 10.98.14.79 with SMTP id w76mr909018pfi.1.1521190308663; Fri, 16 Mar 2018 01:51:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521190308; cv=none; d=google.com; s=arc-20160816; b=TuFx4dbWNife1Xv7wdpn276U8V/z45uqSGNPbL3e3mFHwxrXjN1jtFqG5P4tYhogoL h5zJ9j15u9Hm8KMzX6x+liWVy0oNP9BgjgMdAj1+S92r78W3+pmcULP/iSmhUrW4v6Ty JBBKHBQMZMuIwfsTFbT2Lge+t1e38RJsmWtHqwUUTpR44OjtoZ2xRYRzaFQUfZeeC36o ufIoqluTAWA0zQprmOS5/+LoZtS+C96zEwTgUnWmLKf4C0V510nPZoqDNaUh4cDOiLgg HMl6VrzIyWSIi+mshjggafjPn/BlC28M65IALUBk1xBNUZ+AyEWOysKv1O/eKWUfsJWt lmDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=kisgSrW9wv5O2z2/PQEpnEPvoWvmYJHve26/blkFnn0=; b=SRgNwfzHnCqNqyl9TmYUE7P/aR8gUno+t9uCvhBdvKPTRF1pEbQW9kiF0v7Tz+su6r 9Y/PD1hVVwdSLXFXypnbUgr86GJwCGPvVjx2cwVEc404bUV1lWbD6Kzg9Ntnh2a+uvpR cYpQDlrEOimjTR0kdd6ywbrOBdh/sUGakEfDv8CX1XHa64eWBpXRu0qu0lAjIlON5Jcs h1qKLi4+eP8ifz9dW+Elxltrwd7c+71lXMzk5Y+0C9pFe3zXvZx1S8UMRAlW760XiXq9 aARAfwda+a4/W4+j4ZOCs9IuDeY2NUZ8SLbCN8KchWqE7b/H2/qp116sPxcNU7iRCO2A 0kXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=mLTTri1n; 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 f91-v6si5843506plf.203.2018.03.16.01.51.34; Fri, 16 Mar 2018 01:51:48 -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=fail header.i=@gmail.com header.s=20161025 header.b=mLTTri1n; 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 S1753271AbeCPIu0 (ORCPT + 99 others); Fri, 16 Mar 2018 04:50:26 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:34548 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751665AbeCPIuW (ORCPT ); Fri, 16 Mar 2018 04:50:22 -0400 Received: by mail-qt0-f195.google.com with SMTP id l25so10106300qtj.1; Fri, 16 Mar 2018 01:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kisgSrW9wv5O2z2/PQEpnEPvoWvmYJHve26/blkFnn0=; b=mLTTri1ne7NRyKIv3gGxS9IlwpCLxWyYx0M8OEah0ZBqKuk5AYWuh/MwjEjl1tk19c /Pxsm4W2AFNAjGq/Gidy5v2i+szylv3bWXZgdx50MtVZWcJVjpl0GlUsYq2y1TvMkUWU oto0EYg6F+LTGD/52KL4oqx3JAlwjFo9nhzEmunn8tWdk6wz6EhBm+Hzp2KJobKN1Eb7 dZ25DLPD33GfJDY+AIjVDkyZ2sdUxhwE1bZrTVQJBsHVn/Rp1H/Z9kfNZxHn1hceeoHy +Ls2pOQags5p6pcySJdkD74PzbyQgvLExH2+Phcx6bg07+zjL2LhkZAEvP2+rd+MjE0Q XSjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=kisgSrW9wv5O2z2/PQEpnEPvoWvmYJHve26/blkFnn0=; b=b1NY2EG8qKy0rERS3M3aDOwlVg86GCQr7OelchWgJBETT3hRTV0N/DbNGb33uoqMMB PovZwsQvqG3GKUbqQr3rsLfosH3rULFf37GhmrftR0suyFL9Tzs80qqVek95nmYWZEC0 XDehMdLHFuUGd93TGtuENRnu1+BjvH2q2GterrxA1II57W40phQYH1mo/iUyAq8s2I51 bm5ZwZhlVX+qSornQNcDN5hrlbpxg4Puyr46OX9xBA3GQ7ySCwz4LL6lcHBO/tcjmQkU Q3yUdiT2WOL9mcF1s1JhtnRskYlTkbMxu5gSd7q1iuBUupZ63rLD50QTNfvPi2M+5Ow+ ntsA== X-Gm-Message-State: AElRT7EBciNdZyxqs1y65auXgPFTbzDK0snfhbfQsLuUl1QPBpxoaXrv 8N58RgEHzQm5T4QvuXAQbGGHzz212COocrZiMI0= X-Received: by 10.200.81.215 with SMTP id d23mr1353537qtn.272.1521190222056; Fri, 16 Mar 2018 01:50:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.54.147 with HTTP; Fri, 16 Mar 2018 01:50:21 -0700 (PDT) In-Reply-To: <20180315224202.96668-4-dmitry.torokhov@gmail.com> References: <20180315224202.96668-1-dmitry.torokhov@gmail.com> <20180315224202.96668-4-dmitry.torokhov@gmail.com> From: Geert Uytterhoeven Date: Fri, 16 Mar 2018 09:50:21 +0100 X-Google-Sender-Auth: ASCo0CgcbGtnpbYfnaAC66Z-05U Message-ID: Subject: Re: [RFC 3/4] sh: ecovec24: convert backlight to use device properties To: Dmitry Torokhov Cc: Laurent Pinchart , Lee Jones , Daniel Thompson , Jingoo Han , Linux Fbdev development list , Linux Kernel Mailing List , Linux-sh list , Yoshinori Sato , Rich Felker , Linus Walleij Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Thu, Mar 15, 2018 at 11:42 PM, Dmitry Torokhov wrote: > Instead of backlight legacy platform data, let's switch to using device > properties and GPIO lookup tables. > > Signed-off-by: Dmitry Torokhov Thanks for your patch! > --- a/arch/sh/boards/mach-ecovec24/setup.c > +++ b/arch/sh/boards/mach-ecovec24/setup.c > @@ -367,17 +368,21 @@ static struct platform_device lcdc_device = { > }, > }; > > -static struct gpio_backlight_platform_data gpio_backlight_data = { > - .gpio = GPIO_PTR1, > - .def_value = 1, > - .name = "backlight", > +static struct gpiod_lookup_table gpio_backlight_gpios_table = { gpio_backlight_gpios_table is unused? > + .dev_id = "gpio-backlight.0", > + .table = { > + GPIO_LOOKUP_IDX("sh7724_pfc", GPIO_PTR1, NULL, 0, GPIO_ACTIVE_HIGH); > + { } > + }, > +}; > + > +static struct property_entry gpio_backlight_properties[] = { const > + PROPERTY_ENTRY_BOOL("default-on"), > + { } > }; > > static struct platform_device gpio_backlight_device = { > .name = "gpio-backlight", > - .dev = { > - .platform_data = &gpio_backlight_data, > - }, > }; > > /* CEU0 */ > @@ -1436,6 +1441,8 @@ static int __init arch_setup(void) > return error; > > if (use_backlight) { > + device_add_properties(&gpio_backlight_device.dev, > + gpio_backlight_properties); > error = platform_device_add(&gpio_backlight_device); > if (error) > pr_warn("%s: failed to register backlight: %d\n", Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds