From patchwork Thu Nov 17 07:21:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 21482 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp259670wrr; Wed, 16 Nov 2022 23:28:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf7DPMJ40FQwyF62S0oUMYF7ySyPLZ6nhzFIY32fanRuamBbuHGXzyxffvFeDp/Dz0vFhO76 X-Received: by 2002:a17:90a:4a85:b0:20a:dba9:ebe2 with SMTP id f5-20020a17090a4a8500b0020adba9ebe2mr7743798pjh.136.1668670124205; Wed, 16 Nov 2022 23:28:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668670124; cv=none; d=google.com; s=arc-20160816; b=LcRyMRPqSHlrxjBBTOnXNb3m/HyX0Sic39L4u4PByjdHDpRnUxFqFVEEOqmahxGvNR 4O5RfZu1/dpBvYhmG/8ebuOT/IeXJztmAzrN1B37/fomjDoOAH8p9UIVpo6kO0+bI8mD blVt73QZqZt4hwt3BC+EruGmZhV3MTd/kZwJFMATLqINUIU7TK3ZHFjdW9JuYbetuKqE KsmdDY992hVhlLtm0IukLhNfw6s+pStHfChOuVO+GGKA4I3fOfj1cHlg7u63Baud3VHa NYPanhGm107dQL1K+LHSyvtlMgKYMeGJtIka+J6sz+8QhZsEInzbX3ndmMcNVGe4f+6B Y0zA== 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; bh=pqDSjaQP9t1jE7WjVghOtYIRkE/e0LfUWX8JqMBFNaI=; b=tGTC4D6OhmqlQB8UliH/hsjt//iq3Xus1p5VaVYxByB+LwX0UqyHtql+/SKCtQ7JMm r2qfAOGVjybsaXrajD2CDVHDC4rTe664UrSdKA5gJ2tdXlMylhFsos5nSDnazFUxFlyB l1KEh/ACSrvhKSvLBvK13/O6TNKsjQU7HNNzaz3STtnlbOnSv61u/sgotmEBA8CQYIHN ejxf1aKIwT7s3BDerYK5yY7MZ9OXNmsR7XSroeGz2Gicn9DL518bit6vHZXUFULt2ZWD PvAIGXphfV13MF680MRDaIfcaaNpenvoLmvK9IVJeRQTkB3feUQEku3er6JiIW8uX7Nd gSaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp17-20020a17090b4a9100b0020a695678e5si195884pjb.146.2022.11.16.23.28.31; Wed, 16 Nov 2022 23:28:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239125AbiKQHWL (ORCPT + 99 others); Thu, 17 Nov 2022 02:22:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234692AbiKQHWJ (ORCPT ); Thu, 17 Nov 2022 02:22:09 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C6F531F8D for ; Wed, 16 Nov 2022 23:22:08 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovZDk-0006pm-A6; Thu, 17 Nov 2022 08:22:00 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1ovZDi-004o2U-38; Thu, 17 Nov 2022 08:21:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1ovZDi-00HDlY-6h; Thu, 17 Nov 2022 08:21:58 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thierry Reding , Lee Jones , Daniel Thompson , Jingoo Han Cc: linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] backlight: pwm_bl: Drop support for legacy PWM probing Date: Thu, 17 Nov 2022 08:21:51 +0100 Message-Id: <20221117072151.3789691-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2504; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=rSqok1k4GUjtAWeSAyFWtQ9yZyvrbmXx+GAVnwVQK7U=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBjdeEJwIfzABoyAsEpLbMq3vER8M/vKHHUdwIlvheh rgvLFW+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY3XhCQAKCRDB/BR4rcrsCV0AB/ oCGu1BnxfECZOLO6M3AVdlDI867ImIggjUXeq4vMaxX9R73D/rOkVaKrmsp5nS1jLSdBmIEwEamNxE D/xd8KzJsqdK3tLMIP+ig3TkZo+TUae1i4SjeJuZ0WvYO44lefTwz3C/JfgCLwoz1G3sz6sa6bHIvQ KXaPggRyfIGuMeyd9C7AyptL9SnGqs5sZNTuiT+h+4QhbcWS6jWM0pBG5IkEp6uvexHs3D8OG5xmDc D1+6JxNHTwu3xbBGS4oGC2aZxAQLfSZnUvlBC4werJrWD/QCWpi00v6DXMUyT+Lb8dc6IcSNaqvUeI r0VshUIRi4rhAyrOGFQBuboRKV3+4n X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749727444427074597?= X-GMAIL-MSGID: =?utf-8?q?1749727444427074597?= There is no in-tree user left which relies on legacy probing. So drop support for it which removes another user of the deprecated pwm_request() function. Signed-off-by: Uwe Kleine-König Reviewed-by: Daniel Thompson --- drivers/video/backlight/pwm_bl.c | 12 ------------ include/linux/pwm_backlight.h | 1 - 2 files changed, 13 deletions(-) base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780 diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index c0523a0269ee..d0b22158cd70 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -28,7 +28,6 @@ struct pwm_bl_data { struct regulator *power_supply; struct gpio_desc *enable_gpio; unsigned int scale; - bool legacy; unsigned int post_pwm_on_delay; unsigned int pwm_off_delay; int (*notify)(struct device *, @@ -455,7 +454,6 @@ static int pwm_backlight_probe(struct platform_device *pdev) struct platform_pwm_backlight_data defdata; struct backlight_properties props; struct backlight_device *bl; - struct device_node *node = pdev->dev.of_node; struct pwm_bl_data *pb; struct pwm_state state; unsigned int i; @@ -506,12 +504,6 @@ static int pwm_backlight_probe(struct platform_device *pdev) } pb->pwm = devm_pwm_get(&pdev->dev, NULL); - if (IS_ERR(pb->pwm) && PTR_ERR(pb->pwm) != -EPROBE_DEFER && !node) { - dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n"); - pb->legacy = true; - pb->pwm = pwm_request(data->pwm_id, "pwm-backlight"); - } - if (IS_ERR(pb->pwm)) { ret = PTR_ERR(pb->pwm); if (ret != -EPROBE_DEFER) @@ -604,8 +596,6 @@ static int pwm_backlight_probe(struct platform_device *pdev) if (IS_ERR(bl)) { dev_err(&pdev->dev, "failed to register backlight\n"); ret = PTR_ERR(bl); - if (pb->legacy) - pwm_free(pb->pwm); goto err_alloc; } @@ -639,8 +629,6 @@ static int pwm_backlight_remove(struct platform_device *pdev) if (pb->exit) pb->exit(&pdev->dev); - if (pb->legacy) - pwm_free(pb->pwm); return 0; } diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index 06086cb93b6f..cdd2ac366bc7 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h @@ -8,7 +8,6 @@ #include struct platform_pwm_backlight_data { - int pwm_id; unsigned int max_brightness; unsigned int dft_brightness; unsigned int lth_brightness;