Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3633501rwb; Tue, 8 Nov 2022 06:48:25 -0800 (PST) X-Google-Smtp-Source: AMsMyM79tAoSjP/WNNvBFWt9mJTqnXBY4ZIhISUHkMX28WQqLwZGkcXJENptsTSUil325MZqgvrM X-Received: by 2002:a17:906:195b:b0:7ae:108:9729 with SMTP id b27-20020a170906195b00b007ae01089729mr33242767eje.604.1667918904895; Tue, 08 Nov 2022 06:48:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667918904; cv=none; d=google.com; s=arc-20160816; b=FhE1wNrK/L7XtvmZ2nvym1uemxl036t3fzfG9VSny4rMy1XwoUyrr7thFGR54aDefs Hs50Bcre3t64MF7D+G+UKM7UHiGz8o/p8UxNbpliM4c+0ZqjvBV1O8ee3KPslv5F40nv 5EMLEC1yQHwdBJ4AA4e4A8GdRUFZzRZig5ln0RAqV2iArywHUgAdvAC8KxWq+giIvEXx ug4H5MpQFft0mfQKD5noO2LKTjdLkK6YivWTBkpBETkWBetZxkmkN/6racyZEQ0Q396i Um811lfkc/wY2bgSvOswPr1zksye7LUrZXsYMuabZO7NjhwC3idT/xHliVqlEv7TJ5b1 PNWg== 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=ja10i/+FGGcIospyEbaZwmx5exM6xSLPnTcgO6I2Dfg=; b=B2xS0Aku9CSPAVK8ll3Uupbist/KJIZliJ38iM7+8s/44WV9Ww8ZoTHgvPZYqLSf/J uE4s7IJ340ALl24SYPr9ZnQv2vXvNRr7jQglMEyOlIm1b7GHluVFiqP0UbWxm+cDaV2z emvQ/uUA2/TLVqg87FFet3+2yk1TSd1XONZ0lYP9vqAaj5urgLzAKPHiYTqmYQ+WMAD0 qQeBLwJeRQZDQ1iMcPyqgIHs1TR690l5EJLFwJ4jJtIJyII4T6yTa1cNyo7nN1J7r1Yk CyeBQGmXkXSypw6CHGnuygc1+kA9Ehf+6Xt7gx9QrPuJd2ry+CiUjEvdExu+mqzaiqzq AMyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HWwT3AIg; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd10-20020a1709076e0a00b00791a3dd01b6si11948917ejc.864.2022.11.08.06.48.03; Tue, 08 Nov 2022 06:48:24 -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=HWwT3AIg; 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 S234398AbiKHOWl (ORCPT + 92 others); Tue, 8 Nov 2022 09:22:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234589AbiKHOWI (ORCPT ); Tue, 8 Nov 2022 09:22:08 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E51C54B13; Tue, 8 Nov 2022 06:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667917328; x=1699453328; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jmvq9J3vKVtopSojPs7YdH4K99jNadewdc2yE8CsvjU=; b=HWwT3AIgrd+7IjtOHLu8rOxuFRIE+nHxD9Y/YFfDpslBBK6uMbmIXPKj fGOH2Jz4/rwjPweGLDf/DfKDzv5HjE1XyGrNZAZAC91zAw/KP41I6j3mz VCmZzK6+ByKmsUinDLrD0wFUDOVfCu3wrcpKuvTpPvgPB3X/kTVPBAuHk K98NUMTfceJ+SNapnoW2BoPudAueCDegVcd+6BnTgrDtFRp5JVxj4ZgBa mw9PrcBE21vKuFNBoy+psZMjfskc+NxKUgAhp5JQRoPAgrV48bScBDd3n /laBS19PBW6tOa6Ou6iJ0K/2JObZ4B+XB/DJPDnazwTnbUBDzdVpZtXjj A==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="298219282" X-IronPort-AV: E=Sophos;i="5.96,148,1665471600"; d="scan'208";a="298219282" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2022 06:22:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="699938291" X-IronPort-AV: E=Sophos;i="5.96,148,1665471600"; d="scan'208";a="699938291" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 08 Nov 2022 06:22:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6B189155; Tue, 8 Nov 2022 16:22:27 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , Hans de Goede , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Thierry Reding , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Andy Shevchenko , Linus Walleij Subject: [PATCH v2 1/6] pwm: Add a stub for devm_pwmchip_add() Date: Tue, 8 Nov 2022 16:22:21 +0200 Message-Id: <20221108142226.63161-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221108142226.63161-1-andriy.shevchenko@linux.intel.com> References: <20221108142226.63161-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 devm_pwmchip_add() can be called by a module that optionally instantiates PWM chip. In case of CONFIG_PWM=n, the compilation can't be performed. Hence, add a necessary stub. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- 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) -- 2.35.1