From patchwork Mon Oct 2 13:56:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 147414 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1607679vqb; Mon, 2 Oct 2023 11:17:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAcILtY8zO25lM3YZvl1AnQe0DDiVk1Ccaq9W9D2VGfYuaJ1tGeIdrPydZkNBzV73PrzuB X-Received: by 2002:a17:902:d491:b0:1c4:2b71:7dc9 with SMTP id c17-20020a170902d49100b001c42b717dc9mr14232751plg.4.1696270638599; Mon, 02 Oct 2023 11:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696270638; cv=none; d=google.com; s=arc-20160816; b=tNR/VZadBCEff2C9IJMfLUwReMGlga8h+Mnbs75JKMKzrBXzuijx1sfBxPxuS6deSA JnmyHF6ORir5W9YzWk40nCAB+26RCltPRbaFNuY/aGFd2JMk7caz4Ulfq/2eTqRei60x /4wo5PrnDJy8CYRoFF5yZvlWuysgvy5Tw8Abf9NIDsgXPA3G+tNfils2DdmFpBOmgKA4 cZgg7O+l6uXntpVkbs5FvziC45KMmWwWRCwGZHGf/vi3A2nZ5YQX6HF7XwVN/3iCDbXd 83FzS6Qcog0O67x1ZCv2emqVyFfFqKeQ/BFx7HEZCe6fDk9SoAlhexxWx3K7ifAEjazk mDUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=AGSEhPVvPpbfn4PuVycTTCE6hs8nCz0pvFPQXO0fKLg=; fh=UY/r0YkzEHlxsxnWDl1uA94bYL5cBXUQnKtiEnYQ3D4=; b=Qoyhsm52Iq3s0qvrH2Yz69ALmdtZs5v4bthgDVyltxSbUKdv0ZoS0fpW94tV2AOOk6 QlsphRXCuxy2Siw6hJ5EunxKVtUiSDwgc4vn7FXlB0enyacZLGBaWGDkWCLy1k4hoAJ+ WcKCCd5P9OGy+4SjlUwdQrKNjtOXQCqv35Y8aYFobWQgxjXv6rN41rdi9Ahp3l3py65E 22HRVUiHQdpgaf/vlrnpU60FXMbw1mnyx5yKr/3sqLO0U3nmZRVCFkew1iEDxSN8K9M3 CQvbIrgPe0V1v4Re7WiOSZJAp723ifmIXu0+ho1gSJ3D5vaaQlyMddt3E1uiP6WKENDo GWFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m3LD9Squ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id i11-20020a17090332cb00b001bf1973eafcsi20016413plr.571.2023.10.02.11.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 11:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m3LD9Squ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4933A803E8D0; Mon, 2 Oct 2023 06:56:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237592AbjJBN4k (ORCPT + 18 others); Mon, 2 Oct 2023 09:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237657AbjJBN4h (ORCPT ); Mon, 2 Oct 2023 09:56:37 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37E83AD; Mon, 2 Oct 2023 06:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696254994; x=1727790994; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iB27Y3GxWfGv0KsgGx2AoqPZrJKjVCm9lyDtEfzmT+4=; b=m3LD9SquWZVsMqUOe9Rwhe2X2oKx7QUiJmfs4g2cy0FYS5GBVhyWVb6J 0nRLl0HsSax0RDU52YYLdZbPJLbsTZmdkBpreNggX0VDFrcLncYC8+kRo KcSc4RbMxgWpYHs4MagiK8vU29HQR7CSMuXTKIi287VWNuP/xfvsQDF0S G9aPTH46Sk53+OY+/NoGxDydAp58d4VIGtvcSBt5g7qzT3Dyhp/mDeAYg nug1WOjlkJzlhB3JZeCoEwyaVIEvwLHDD7kTjQZObsPqt+RPWjf4WYdmw 9+uAnsjfBY4nXEH9pfhSxh2yL1rkBjxrU1u3nWkR+fsWJrVjFaBGGa8Ew A==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="362912072" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="362912072" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 06:56:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="785782661" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="785782661" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 02 Oct 2023 06:56:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C2CBB14AF; Mon, 2 Oct 2023 16:56:30 +0300 (EEST) From: Andy Shevchenko To: Lee Jones , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Pavel Machek , Andy Shevchenko Subject: [PATCH v1 1/1] leds: tca6507: Don't use fixed GPIO base Date: Mon, 2 Oct 2023 16:56:29 +0300 Message-Id: <20231002135629.2605462-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 02 Oct 2023 06:56:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778668681079992087 X-GMAIL-MSGID: 1778668681079992087 First of all, the fixed GPIO base is source of troubles and it doesn't scale. Second, there is no in-kernel user of this base, so drop it. Signed-off-by: Andy Shevchenko --- drivers/leds/leds-tca6507.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index aab861771210..e19074614095 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c @@ -92,9 +92,6 @@ struct tca6507_platform_data { struct led_platform_data leds; -#ifdef CONFIG_GPIOLIB - int gpio_base; -#endif }; #define TCA6507_MAKE_GPIO 1 @@ -636,7 +633,7 @@ static int tca6507_probe_gpios(struct device *dev, tca->gpio.label = "gpio-tca6507"; tca->gpio.ngpio = gpios; - tca->gpio.base = pdata->gpio_base; + tca->gpio.base = -1; tca->gpio.owner = THIS_MODULE; tca->gpio.direction_output = tca6507_gpio_direction_output; tca->gpio.set = tca6507_gpio_set_value; @@ -715,9 +712,6 @@ tca6507_led_dt_init(struct device *dev) pdata->leds.leds = tca_leds; pdata->leds.num_leds = NUM_LEDS; -#ifdef CONFIG_GPIOLIB - pdata->gpio_base = -1; -#endif return pdata; }