Received: by 10.213.65.68 with SMTP id h4csp35831imn; Fri, 16 Mar 2018 16:42:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELt8ljKTOGl0cGDrt9XU1+Yp2u0DEo7tv5SgdXmachcQJ/S4CbWR/4vHEB1FjrBwf1rbGglD X-Received: by 10.98.233.3 with SMTP id j3mr3151517pfh.38.1521243732931; Fri, 16 Mar 2018 16:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521243732; cv=none; d=google.com; s=arc-20160816; b=og8V8Qa8FIzpxikP7Xng9GhxF7LSaYGT3rNOWMoJjlCmE+uTkNBNpHQRfsTE4Wu9BN 8VUbHnLr+MDfF57CfG7vDksjRecVZVX4WMWt/8Nt7iEAHOegkvebpmswDKbhuMkzwAjM qQLQ7tLxjaB7pk6dvEQg+/UJdZf46Rrouqd63uAZVZ1WjoyEKsR/xibIp5iOazZOBTZS qczhBK5p9O1+jxVTB5UfyzLYrvT06V3T/TnrKdVBHvi8OlJ3kiM8cukemKdmKf5XEwjX eXOn/M5QqI9Rm5sGCci0TP0YpNVVOfFnSu+nWQvgXCbfMij7qF1uLzWLKG1fOLegZnjP 7m+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ds155VBBTnVsk++hryqlnKjneuzBCZ0/SArnS0HbYao=; b=me9g3iDJi+xw8abAr71tXLZvbTFRANBMgJ7JQKso2OWXEZi4QAhLpHstpvYsX85TNx /9N6/nzioh8KlefjoSqg0YikVOn+imjGHjMI1fW6lTX6DQAZpvG88u7qzWPMuLKYPNjs 5CEK9iQxeORuyIOQe76wu50DG+SqFe+eHuZ6B2u1Dw0nGywm4ASihMCiMrloWeRr3fpO Z0gAYX0qTPUcQWwxub5DWdogTzCenIrEjEkzK9Kw3KsRUrnZ85AR/ahcZ+SONPIaSL+V W66Mh1UH5xu9kVM/2AMisAQK3NGiCx2e5lrglvmuCo4OhLW/j7L3oQ8N38gZ4i8fUvX6 RpDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N2DLi5AM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z123si5739735pgb.466.2018.03.16.16.41.58; Fri, 16 Mar 2018 16:42:12 -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=@gmail.com header.s=20161025 header.b=N2DLi5AM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbeCPXkr (ORCPT + 99 others); Fri, 16 Mar 2018 19:40:47 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:45648 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752609AbeCPXkp (ORCPT ); Fri, 16 Mar 2018 19:40:45 -0400 Received: by mail-pl0-f68.google.com with SMTP id v9-v6so6771901plp.12; Fri, 16 Mar 2018 16:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ds155VBBTnVsk++hryqlnKjneuzBCZ0/SArnS0HbYao=; b=N2DLi5AMeQ8Yj8F1E0APNCv7FOx1BRg6uICxmzBIGmTdGarkd61CDQShRwr4YsrlLW ehaw700UnX/U5vE+CShCAJ9OdjanyuxQh1vW3iZVVv0NOKSTDieKxK03CH3B+oD/L1vZ EGHnwFue/pUz2YgAlYRqwp6024f/k4qBW9I5zQipkqAnuHRXVb9YSwpsyJm1tk69Rwas /HXcjGv/ozH2HKGvht7p1hK12yFHwFRCwDguvtnWi3VXhKDu+d/uEx086jW5t8QbNCNX HIzV/+Yn171MZATTiXN3Gb0hv0ty4G2X67Vnk8h0imc4NYT1+PmC5lNmJGJ7X3EQ7OL9 ZUMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ds155VBBTnVsk++hryqlnKjneuzBCZ0/SArnS0HbYao=; b=NNsIOHli109jwHrEB0aCLK49VYTJ5W/eduqAcpRUu92PWI2crrIAJHAsLdn91YG/DL Nt6yoCdap8OdwW1b5DfWCWVPHzVKsbjuqbl23B+SRUMFH/RBmk0n0GU/6lbmBt/bEYsS 2wD7n2Tdfl8+T9pTqepqbR7l94lGN93F9MgFy4668IS5LoVguZo4mKLxYQzISFWm4Us9 hKRrtamOx2LitpeoFZNdnz+fFum2RkEEVdgpjRMBU1mC2TYwAhqySr15brVrxqnRNvJr fi3HHikwKpUDGzcptIkxCfu8K0hsw89uVAefyTX6o0qRPh2QmC8I3yvPHlclDQwfia+b +Teg== X-Gm-Message-State: AElRT7HWg4LDzOZXLiI8VNQkQx6PScQYahUDKRqxLHMDFhsbguXjyeTV Di8NOTdTl3OGNhvcdaPLiSk= X-Received: by 2002:a17:902:8287:: with SMTP id y7-v6mr3865994pln.85.1521243644401; Fri, 16 Mar 2018 16:40:44 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id 9sm17641254pfq.63.2018.03.16.16.40.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 16:40:43 -0700 (PDT) Date: Fri, 16 Mar 2018 16:40:41 -0700 From: Dmitry Torokhov To: Geert Uytterhoeven 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 Subject: Re: [RFC 3/4] sh: ecovec24: convert backlight to use device properties Message-ID: <20180316234041.GB32310@dtor-ws> References: <20180315224202.96668-1-dmitry.torokhov@gmail.com> <20180315224202.96668-4-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 09:50:21AM +0100, Geert Uytterhoeven wrote: > 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? There was supposed to be gpiod_add_lookup_table() that I lost as I was reshuffling and reshuffling the patches. > > > + .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 OK. > > > + 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 -- Dmitry