From patchwork Thu Nov 17 11:08:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 625862 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 916BEC4167B for ; Thu, 17 Nov 2022 11:08:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239776AbiKQLIS (ORCPT ); Thu, 17 Nov 2022 06:08:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239832AbiKQLIG (ORCPT ); Thu, 17 Nov 2022 06:08:06 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC1F169DD2; Thu, 17 Nov 2022 03:07:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668683277; x=1700219277; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/5ATWhqQrc1DZJ4f0j7ZyUNBHQXbdLiioN7qk5/mljI=; b=KfIz2r7Y75mo5nPtdgO4lOO3Py56jWtwjG2TEC89NqqoTHfpcRZ8cL6C +d2qNTf0KryBnGuI8JmFk/p6yegmn7+4eq7lWwRKHE8d/T1y5h15XxZr6 9k91yQ/bu7BsXnZDDiopml7OwHGAXiOfr5AEg81I9fXawCfYQTUJQ01Fu WXvQeqeav7QtRgX8kDgMjAfXqsnf9juxMRixA3KSTSrgYOK+x8DdXKcVb Zwrna53sDhHAo1HBaJKMSjDO5pekX0iuCKvW5pQCgWL6U7lQGJaqVSlnl ESc7rToaQ8ptCSDIqP5PP37aaKA7KxaFWEbeY/TEpjx0QxPpt+PjLRZv6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="314638714" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="314638714" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 03:07:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="617572329" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="617572329" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 17 Nov 2022 03:07:54 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 91D9E2F3; Thu, 17 Nov 2022 13:08:19 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Hans de Goede , Thierry Reding , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Andy Shevchenko , Linus Walleij Subject: [PATCH v5 1/7] pwm: Add a stub for devm_pwmchip_add() Date: Thu, 17 Nov 2022 13:08:00 +0200 Message-Id: <20221117110806.65470-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221117110806.65470-1-andriy.shevchenko@linux.intel.com> References: <20221117110806.65470-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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)