From patchwork Fri Nov 11 18:43:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 18975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp911636wru; Fri, 11 Nov 2022 10:54:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf4z2l0KJJY5W48+f3fqU9iCaUcR6V3Izds8yTGNbNA368gRtcJhtX71CXka7LUEb16dfae+ X-Received: by 2002:a05:6402:298a:b0:461:4c59:12d6 with SMTP id eq10-20020a056402298a00b004614c5912d6mr2731303edb.250.1668192852656; Fri, 11 Nov 2022 10:54:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668192852; cv=none; d=google.com; s=arc-20160816; b=07hqJUXZt8DCt0H4imPa4RZGQlaIrMeCn1S/Eo32sXgs9TshY3uusJrAqBRH9W5I/f YiteFrNWxtnvyUSBK9j26dJdxiLcGpCMD6xtUXTK1QrQwQo7e0M8cQdUmRQBjsQw8GZu b8+8X+r4RMW6PVpy9nxSw1mlxa1lNQ5jaDeRTCXy5DFeJ25HmKC94kB2sJZG72jRYmti MMMXJocvFZebcdtCU6Ho4SYx16yBtElJW/52++oJpxPp1ADoOFBvI0On7Ge0kf7Et9/g WpDUH0gMFK0xTNymPJwBLnp9bwx605KIMdtAMK+xhW8RQp1UiQMySmzHMzM8Npxr7nUB V2Vw== 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=4mJHNUNkUb7RaQffjAzU/xeJwrC/qNrnQPj0zB1QRdQ=; b=jZClJZtQHMZQbsTRzLeq1IAVewGN2cdbwb+A4CLt7+7jQnWm7E9itbu2PGor8UiCN4 JRFUvubOg6lwKfH1E5cdXQlEvwljXc8pNjjIDCZhuei0vrWvSf96C+Yh4B2p/aHWofiI vgk7eYW1mHsvp8KSHWC7yCPd5X8ycvHJmx/OMgii9kBpfYRNjsaUV2NVcDr27X5hv20W KpcXYoVuRbbiLzCan7fjW2gzKMYEzw065E+tXItzkc8BGAWt1hqpOvt9pLmqO2jRikD0 L+oLIxqFk2ZzySrqXOjBar3yaHwUen9nbdJh+DT0K8QIE7FxdfiMttLcZSOTwrVNUpuv n/jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="V2lHhM3/"; 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 y69-20020a50bb4b000000b004636ec90769si2692524ede.33.2022.11.11.10.53.47; Fri, 11 Nov 2022 10:54:12 -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="V2lHhM3/"; 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 S234575AbiKKSnf (ORCPT + 99 others); Fri, 11 Nov 2022 13:43:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234074AbiKKSnN (ORCPT ); Fri, 11 Nov 2022 13:43:13 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F9BF10DE; Fri, 11 Nov 2022 10:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668192192; x=1699728192; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/5ATWhqQrc1DZJ4f0j7ZyUNBHQXbdLiioN7qk5/mljI=; b=V2lHhM3/8IKWBNlb/uxz6te0myWl+2emBlPmpikg4MH3zdUUQ87d8Xud UsGUnYCj8veQhc8eyVCkis9H7V/F7EVbBvwyuuGAuU6H4w7QoRVBGtn7V QawpiKLP8pQrQDxW8+F6OnThKFRZJUO6XDuSJ04HCkdA3IHrtK8iXxiUX YhpkbDuUOIVebCJRSGEN5o/vE5m6j6dIC5FD6Veh8SdwVbxB6OYVQONtD CUMDkGT8DJS1+oF7Wmja92bnWoNGpQtSI9soNYNjRMKkM3OTTgfGZ4+4J p5eDb9+hcvO+z+fr+I4Z2dYTN9UEhKUA7Vb7JfL+HYH/Sq4YinGdybG2N g==; X-IronPort-AV: E=McAfee;i="6500,9779,10528"; a="299162181" X-IronPort-AV: E=Sophos;i="5.96,157,1665471600"; d="scan'208";a="299162181" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2022 10:43:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10528"; a="812517791" X-IronPort-AV: E=Sophos;i="5.96,157,1665471600"; d="scan'208";a="812517791" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 11 Nov 2022 10:43:08 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 13900B7; Fri, 11 Nov 2022 20:43:32 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , 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 v3 1/6] pwm: Add a stub for devm_pwmchip_add() Date: Fri, 11 Nov 2022 20:43:23 +0200 Message-Id: <20221111184328.58108-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221111184328.58108-1-andriy.shevchenko@linux.intel.com> References: <20221111184328.58108-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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?1749226988800308832?= X-GMAIL-MSGID: =?utf-8?q?1749226988800308832?= The devm_pwmchip_add() can be called by a module that optionally instantiates PWM chip. In the case of CONFIG_PWM=n, the compilation can't be performed. Hence, add a necessary stub. Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg Acked-by: Uwe Kleine-König --- include/linux/pwm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/pwm.h b/include/linux/pwm.h index d70c6e5a839d..bba492eea96c 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -478,6 +478,11 @@ static inline int pwmchip_remove(struct pwm_chip *chip) return -EINVAL; } +static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip) +{ + return -EINVAL; +} + static inline struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, unsigned int index, const char *label)