From patchwork Mon Nov 14 16:55:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 19928 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2251390wru; Mon, 14 Nov 2022 09:00:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf6fBQvbtAvARYmuYSf8orHLYXMfYsl7Hx12BMARR39GeT0qS2WqAPEnf5EWC4zMlcVUjFAw X-Received: by 2002:a17:902:bcc9:b0:17f:cdd1:7ab1 with SMTP id o9-20020a170902bcc900b0017fcdd17ab1mr137545pls.86.1668445245104; Mon, 14 Nov 2022 09:00:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668445245; cv=none; d=google.com; s=arc-20160816; b=PBmRyA/wWoKks/7Moon8w3pC+Apjr6wNQNYQIVM8gScsxWNmd3P1/L5oATJnDW30Gx 97HGg4aIqWNmfey2SW1ht/f1Nmox+YQSStP4JEYkyBhzf8VzSMvCkKIi/o8EAq4DxR3L zxbssAOiMrwagS7FvWyFdLOa+a4yUV07vl1XHtV4qXtvwaw+60Sp5CQ0D5BHgaVVPC/T iI7ph/IHYQw8UvQvzjqYrE8IIQawYg7lhKNtyyWLEdzNAGWDVjapqEUEq7KCax6+g3nj 8OSpD0rgRd7atXDdHOGi2INgw9WggWNGNCfetGgHYr1dVUCxaS46TdFq3XT6M7Sh5GsU HY8w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MFKxy3kbakFchJNSIPgMdW8uXCXs6zXv162PRaFFwHk=; b=B8GgfCWtDIHnEyx0FeiIILJCRB9WnG4uwBFX4eKV+pCourIGlN2Dx2Mw5i280mALQQ 8ahUyp7px39b/Hxw1uhGZaOTJV44fNutEImo0vKw6cmTJlGLBv0lgGUUNf76sica/4vj P3RQ/WE7YQUXFuTbWb+8i+ObTTwIqH+row/Jijp1ai2BgwVKzv5lzJ7l2kRccJkVvMBO tRD2mgxRYUG/pFWYQHlMKj0veoygToxLKbWxa4XjtRhv8AD35t0xDbvJ785/1l0nFyQQ q+hHJMHjktQWf9SMl3ZkWvDNWlmFS16JRWTL7Vej5yxy5FCPEEqnX5BB1r3BSOnsdzQh bbkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UFSVZxDp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020aa788cb000000b0056d89d8fba7si10715352pff.154.2022.11.14.09.00.28; Mon, 14 Nov 2022 09:00:45 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=UFSVZxDp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238046AbiKNQ4B (ORCPT + 99 others); Mon, 14 Nov 2022 11:56:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237534AbiKNQza (ORCPT ); Mon, 14 Nov 2022 11:55:30 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E88B6186CB; Mon, 14 Nov 2022 08:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668444928; x=1699980928; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vb4Kjx+Zzgw7pJ7ccpP6XKDAM1GDRLtTdQAtD7V1YcM=; b=UFSVZxDpalM2YYD1T6RFq7dEwhdAGYuQZ5g8koAfC1UendLsd6DY7iQB jTffM8ir224m61XgRdK+XzM1darMRNGQDvy+EZ6mPuMqNPIOtoth4/GrB 8RjmONiA/F3CJL+vFFyGW4IU0drvQZgWixHMEA4waNl/RVKjLFx7CJsFy G/I3IJiYk1+KRn49PVAZ8ak4iMYaGnNdICG7J3PWNrzcvoWaBDHA2o04t +o3hTiwV5hlECM+JCo0KGKbxm3yS0OyR0z8RKz7Z8DCfnUM8vbEZCavon oGRpO8YT25wMy6gaoc9nTt9q/wFKqcp7c712qKD5r2CmNBJ+dMd++nI2p w==; X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="310728460" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="310728460" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 08:55:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="727593562" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="727593562" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 14 Nov 2022 08:55:26 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2C7E7389; Mon, 14 Nov 2022 18:55:47 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Thierry Reding , Hans de Goede , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Andy Shevchenko , Linus Walleij Subject: [PATCH v4 6/7] pwm: lpss: Add devm_pwm_lpss_probe() stub Date: Mon, 14 Nov 2022 18:55:44 +0200 Message-Id: <20221114165545.56088-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221114165545.56088-1-andriy.shevchenko@linux.intel.com> References: <20221114165545.56088-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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?1749491641603820530?= X-GMAIL-MSGID: =?utf-8?q?1749491641603820530?= In case the PWM LPSS module is not provided, allow users to be compiled with the help of the devm_pwm_lpss_probe() stub. Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg --- include/linux/platform_data/x86/pwm-lpss.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/linux/platform_data/x86/pwm-lpss.h b/include/linux/platform_data/x86/pwm-lpss.h index c852fe24fe2a..6ef21b8baec7 100644 --- a/include/linux/platform_data/x86/pwm-lpss.h +++ b/include/linux/platform_data/x86/pwm-lpss.h @@ -4,6 +4,8 @@ #ifndef __PLATFORM_DATA_X86_PWM_LPSS_H #define __PLATFORM_DATA_X86_PWM_LPSS_H +#include +#include #include struct device; @@ -27,7 +29,16 @@ struct pwm_lpss_boardinfo { bool other_devices_aml_touches_pwm_regs; }; +#if IS_REACHABLE(CONFIG_PWM_LPSS) struct pwm_lpss_chip *devm_pwm_lpss_probe(struct device *dev, void __iomem *base, const struct pwm_lpss_boardinfo *info); +#else +static inline +struct pwm_lpss_chip *devm_pwm_lpss_probe(struct device *dev, void __iomem *base, + const struct pwm_lpss_boardinfo *info) +{ + return ERR_PTR(-ENODEV); +} +#endif /* CONFIG_PWM_LPSS */ #endif /* __PLATFORM_DATA_X86_PWM_LPSS_H */