Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7295177ybi; Mon, 22 Jul 2019 10:29:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9qSp5WTWjiRneUjcaQcZPY3FRB2TQPmQPUILpEfBpOkrE2r7wLuHhV57SDdHCTp/H8Lqi X-Received: by 2002:aa7:9516:: with SMTP id b22mr1305100pfp.106.1563816542702; Mon, 22 Jul 2019 10:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563816542; cv=none; d=google.com; s=arc-20160816; b=Z62fDiYMMNiFhxOR/qpgKvX/WhkLeXbCr8lu4v/7lnPSX8vltQBeBksy2vKkuBx5NP UmrLLVjsRvhlSypGFTCMGNj2JaZwbHHVirKNGeMuH/IdZQl5cNUyMd0BOpKQ+Szxozk2 bltmD88lIOldrLqLaRHtXCJVi81ioxFNlYHdQ+nAFVnHFXP+qxq1O7uVDz4zneumbIx5 cH975tDx1+v5ZWgsc8V5xkBZP4iKKdQh9auDjUOFo9ZUA8SxAJHcXbQsrQaafHCZMCeB ym56pfu914d3Vw0SmuAbAx2blVaIP65WectY2s+EhNOSjP7jGMMXJ+iZCOM8idHOCd4W QHyw== 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=DdufiTePFKOcw3PXCBBvJkARSPrI+OCusBaTYJELEjQ=; b=uubgYJfCYReig3+38uauF9eRKKPH2ps6kqHaiImekrqVe4pz/JrcfPhKVwv4QtHpIV bkfLcyVR/NBLlUVxjvsEZ39+r68c6smaDT6xxQ8UQHLY/7/aAntZDM6ToXcrkNzwqxPR /LkSnFknIzV/gsXnxz/DvOuT0c3SQGJmRoBn7MqXP2mieeq1jc8g9tO0t1khx0022Vpp RXh9yDPtDd8CFzMG1+epCdSXf29TkKbnNQzePGzwJLYq2L5SgNruuDSXhFQcUs1GnfcH WdxriLjIPxt6Onc4Zc3I3vvlqaWBAi0jqWrDmPGpyHirDA8Neze18M6im4yc0rV7my1P 5xJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=TsqapSCF; 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 c64si9920486pje.9.2019.07.22.10.28.47; Mon, 22 Jul 2019 10:29:02 -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=TsqapSCF; 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 S1727218AbfGVPDS (ORCPT + 99 others); Mon, 22 Jul 2019 11:03:18 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43415 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbfGVPDR (ORCPT ); Mon, 22 Jul 2019 11:03:17 -0400 Received: by mail-wr1-f68.google.com with SMTP id p13so39751333wru.10 for ; Mon, 22 Jul 2019 08:03:16 -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=DdufiTePFKOcw3PXCBBvJkARSPrI+OCusBaTYJELEjQ=; b=TsqapSCFfaQBoVbpHKI/m+obmflr41GlOM1rPFV007j2Zv7OerhmRuJG21pozO+P1A jTOHiU/zOVdxrV2v/bG8njldvSpnDW/pU1d6WXmgBNL+ZAnPJupgIR2OUZFCHmVY5JRO NC6gJyFpSSdFodmwdDchaBFsttM8pha0dZkeDgf/TnHgkD16mDRERvJpAH/bTYE0OjoE VlXyqbWGtjvdZfwHscynD/iZnEqcFwQZhNU5rNIDzLMje3EkV/XxY8ZMvwv/X28jazwS NBASzJ6jmaUrYhaiWMIHR1bEPDSX8z4JsW9XGg0EN2DqxVK3oKAYiXwjq+EHr1zxllVK pNCQ== 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=DdufiTePFKOcw3PXCBBvJkARSPrI+OCusBaTYJELEjQ=; b=sUu/qpu57aadW/ai1xpCG5oUnd5DjRc34+2/YLbaZXvqd5LPwbW4Z1R9medGW3LE3B BBLhNwoQLXKwomsoRQI5HJrAt9OaDeVvcaVDWvT2dSKtECjUCECmA/h2rkUvwAcbD/1y ODCK2WB270zGLswoaz6p+0LPd/4rWP0DXzwSSzIewZ2/kNUuEWaRPUezCf/cvGzRK5x1 jb4isu9eyOughLlc364pn+q64b5bE14HzXIS1aXcw+o3Ig3McrzW6CuiaorWjsDn3FHP LHoYDeATC0J4PydnPxUvpf24lE/VK33Tx7pOEphRmOb27jvPqvPmVZhq6w8404wmjYoK 6Yrw== X-Gm-Message-State: APjAAAUNeG/UJVLlPrOAOFcvjxEbi6aFm5pBAKeJlz69GUOAcEYui3Xx /m2DWpKvty1glFlk6k2DQlU= X-Received: by 2002:a5d:5303:: with SMTP id e3mr60089734wrv.239.1563807795684; Mon, 22 Jul 2019 08:03:15 -0700 (PDT) Received: from localhost.localdomain (amontpellier-652-1-281-69.w109-210.abo.wanadoo.fr. [109.210.96.69]) by smtp.gmail.com with ESMTPSA id v23sm36310460wmj.32.2019.07.22.08.03.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 08:03:15 -0700 (PDT) From: Bartosz Golaszewski To: Yoshinori Sato , Rich Felker , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , Linus Walleij , Andy Shevchenko 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 v2 0/7] backlight: gpio: simplify the driver Date: Mon, 22 Jul 2019 17:02:55 +0200 Message-Id: <20190722150302.29526-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.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 Bartosz Golaszewski (7): 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: remove dev from struct gpio_backlight backlight: gpio: remove def_value from struct gpio_backlight backlight: gpio: use a helper variable for &pdev->dev arch/sh/boards/mach-ecovec24/setup.c | 33 ++++++-- drivers/video/backlight/gpio_backlight.c | 87 ++++++-------------- include/linux/platform_data/gpio_backlight.h | 3 - 3 files changed, 48 insertions(+), 75 deletions(-) -- 2.21.0