Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3791428ybp; Sun, 6 Oct 2019 20:32:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqfAfGTSzPvdwNk+yP+0tu5XbFvEvlLNI6G83LwiOfZONTGO/gZFbMgpFeH6hEfzFC1dyc X-Received: by 2002:a50:d084:: with SMTP id v4mr27404310edd.48.1570419159515; Sun, 06 Oct 2019 20:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570419159; cv=none; d=google.com; s=arc-20160816; b=alkFG0POFz14iTrD1EZVNcTUHhiJGqu5JwQ7cl6G6oxIZjw5gU9045cI8pLUh4Usrf bRPP/gCRNB+yCnSPWPUfZWNDMsLPjxK02832iYgGDxAY4UjmBBYf/EkcE2JMQ3UkJL4E lPjZi6xVB9qdhEly46fId9UaBKE7m5CgK/UvV6WowoGE0yrSBZDhEZz1a6Swq5LSSiZl K8rjcrQVFW0zqjpJEcbBdM6e57j0w6riS6q0WQosrPH0DJux16FVaLlSvYlx/bwGVAL3 dd4RVAN6p2BtVNRRMHxkiJaJv3JCCaMPQKrAKilHngII+9QpB9jzgHiua8YaKOt3obqd F8XQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=m6ZVj+HV49loAv95ReQOh5GSunOnE35wX2Bc+0q93oo=; b=j94Qc2gAGwnDpnr4nz6FlEZqfYjC0WHrcuawFmGGF577hONLslIR5QsbptjKZ5hMTQ olnb0Xs6u/gBPUT9KhKjopwjz+gFVkEgV6qu90CD7fWvquALoZNyPKqLEutLfvS1LtpL aWZuxUt7Me833plFjbsRvJAK/RcjuBaRtQmW/UctUJ6A+LfRO88eeIW6v5w0WuUmFU8k C+dGSUMnHrIkF6PezjoKDuKzp4xSvtPp016bQWw9++0ThmTLeLcWXArMZOoKU0zzABxz yuKTJ7/bJtW8uQ/OW59Yy0zxNDuADTGsbGttBZ/mhIRQz2yXXQSzgKNtOSQDfkUwlhp+ Wibg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=KpBM+zmv; 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 s42si7716429edm.292.2019.10.06.20.32.15; Sun, 06 Oct 2019 20:32:39 -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=KpBM+zmv; 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 S1727121AbfJGDcE (ORCPT + 99 others); Sun, 6 Oct 2019 23:32:04 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40640 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbfJGDcE (ORCPT ); Sun, 6 Oct 2019 23:32:04 -0400 Received: by mail-pg1-f196.google.com with SMTP id d26so7327277pgl.7 for ; Sun, 06 Oct 2019 20:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m6ZVj+HV49loAv95ReQOh5GSunOnE35wX2Bc+0q93oo=; b=KpBM+zmvrOzbdWsfbpdXfUOh/HlwxVlM6JtPhdxdQrGG/iNat1s44Xk1dIe5G0yytN g4uFYUJgcL/7ZzJwYBoBSxbzLFp1yUnec+Kny7Hh9U0uLRzHbCgQ1JisnLiswN2gc5KV uWItlqydSYWsSq6Bfpsfzu9YC5jWFxlOelQ4GueEHJkh+czXgYhKgiYvDM0mMVsRgkXu 9rm2kFk2xxohwng1/1LGytYCrVv7SpCWybwGabJEkzbE2+w5xiJQCpuU5Qy5ywjhif9l aAYdY0MmHol877lte5vNPlPFhXptGVMnqp1pXpQ37tF8TGcxxvOs7VAB08YCFBw63bvU jpmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m6ZVj+HV49loAv95ReQOh5GSunOnE35wX2Bc+0q93oo=; b=eoVnXRuxPZP89hGdddsCzyXgCqoXyZubQTV6Rfn+a2NGtERJ8kSgclzx96FFBtFhls lOOFo/qDZH4pFvs2+rK7P6b43awToieCjEnu1Rrj0kT8uWEwf5vg1pOff5Nk+xhCqnzg fA9h1y/36jQzSKY5wcHHWGDQ2EjblffUfcX7MXhToGVvO+8WSKbLrxgsxhFof6S8lsph 5EB9QmmWCKH+D6Wsn82dnnkK8oB2MPyiC+b9m/YzBRC3iIPWTIkXiUZ00LiSbkz/IA9N Y97KH/rrjwWxlyD1KBbm/mwfavrUmLPvMmCVMK9n+Iui+6LF0k6IuUYlwGj9x2yrh8gi LMww== X-Gm-Message-State: APjAAAWRnKWTNbv8zfhcfDxVVSTgKEUbXQAofzJ47R/ukpTK7OXFkPEs DwMuyPr/OzVu3rIokSFu+c9mnQ== X-Received: by 2002:a17:90a:3387:: with SMTP id n7mr29905561pjb.26.1570419123161; Sun, 06 Oct 2019 20:32:03 -0700 (PDT) Received: from debian-brgl.local (96-95-220-76-static.hfc.comcastbusiness.net. [96.95.220.76]) by smtp.gmail.com with ESMTPSA id x10sm16377720pfr.44.2019.10.06.20.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Oct 2019 20:32:02 -0700 (PDT) From: Bartosz Golaszewski To: Yoshinori Sato , Rich Felker , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , Linus Walleij , Andy Shevchenko , Jacopo Mondi Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v5 0/7] backlight: gpio: simplify the driver Date: Mon, 7 Oct 2019 05:31:53 +0200 Message-Id: <20191007033200.13443-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch adds all necessary data structures to ecovec24. Patch 2/7 unifies much of the code for both pdata and non-pdata cases. Patches 3-4/7 remove unused platform data fields. Last three patches contain additional improvements for the GPIO backlight driver while we're already modifying it. I don't have access to this HW but hopefully this works. Only compile tested. [1] https://lkml.org/lkml/2019/6/25/900 v1 -> v2: - rebased on top of v5.3-rc1 and adjusted to the recent changes from Andy - added additional two patches with minor improvements v2 -> v3: - in patch 7/7: used initializers to set values for pdata and dev local vars v3 -> v4: - rebased on top of v5.4-rc1 - removed changes that are no longer relevant after commit ec665b756e6f ("backlight: gpio-backlight: Correct initial power state handling") - added patch 7/7 v4 ->V5: - in patch 7/7: added a comment replacing the name of the function being pulled into probe() Bartosz Golaszewski (7): backlight: gpio: remove unneeded include sh: ecovec24: add additional properties to the backlight device backlight: gpio: simplify the platform data handling sh: ecovec24: don't set unused fields in platform data backlight: gpio: remove unused fields from platform data backlight: gpio: use a helper variable for &pdev->dev backlight: gpio: pull gpio_backlight_initial_power_state() into probe arch/sh/boards/mach-ecovec24/setup.c | 33 ++++-- drivers/video/backlight/gpio_backlight.c | 108 +++++-------------- include/linux/platform_data/gpio_backlight.h | 3 - 3 files changed, 53 insertions(+), 91 deletions(-) -- 2.23.0