From patchwork Tue Aug 8 16:27:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13326 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2405382vqr; Tue, 8 Aug 2023 14:29:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOfI62zEFi3i4ntDAD61k7LLa0fySskjY2eHwVgpNIxfNOl1g4NyJyoRJrRzcYfGv2FyPL X-Received: by 2002:a17:90a:f0c2:b0:268:2862:7414 with SMTP id fa2-20020a17090af0c200b0026828627414mr1188445pjb.0.1691530149954; Tue, 08 Aug 2023 14:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691530149; cv=none; d=google.com; s=arc-20160816; b=dqR4yDET93qG4cyfjMA3Dp/gDOY0XfLkwzOUPeMTHPXkAACTHmHWhmRNL8miaZ14Q2 Z7iiIizBlhpJmIpOK0iJEaxNOch9+/qCb+AMKCT1+j1aLSkZei6FIvaXrQgnYyHfLnIB MsII84gUaZkjxstpTSCQEydEGnd2LlxRGeZ8fV8vDJ3iIqrduQ/Ar5qk1Zav9Mat87MT 4shg0uetwwpuqL26pTTPSyZvXt1utQ8qrr0Ao6UaMB38Bu3fit/2Q0o0Pl5MOkZYmxHZ KEk8VSe9VRT3lOBjjgLe3/tx863w6O7os3r0sSViptYvfZGHeKjWutYcw4Mw/OxWzhT/ CoWw== 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:dkim-signature; bh=xCefBy+47Dn+j2utojZhOyoRxenR+6/WEwAESUBN0DA=; fh=pEdA8+/af95LJlWFD5rBB7RG10kRMWALDQ/52TY9s20=; b=SHuW9tfrDar9PRkHJGph7NAmMp0zi1LsUE/2lkpfK8g8rIh8poqlEJFafyjIew9MUC aigoJ2bXTGwIrHHDr+xnQ3WJVfDo7/rIw0UqRZ8xaxKegmyquqrvKxHFDqdSvb+t8tKb P/zuwZYrFQp+bmSqvMg026p73OiH2fLa3tsdS82NAbOb+Klmf3EDD/pxoqjR+pk62CfV nmhyl6YGg5lI18HfzI7OXx7Qem5cYz8otmr48INihFpeQNahC97dEgyi/S9tTX20faVr +nzi2Zl8MTWs9SHUu9oYu9+IY6OCq7ppP/0EHEy57TqBomuS/r65+NVkTp3AMrrOsdAQ XK3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HZtdjIDL; 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 a4-20020a17090a740400b00265ca1c461asi11214790pjg.175.2023.08.08.14.28.21; Tue, 08 Aug 2023 14:29:09 -0700 (PDT) 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=HZtdjIDL; 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 S231970AbjHHS6G (ORCPT + 99 others); Tue, 8 Aug 2023 14:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjHHS5a (ORCPT ); Tue, 8 Aug 2023 14:57:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D9321D472; Tue, 8 Aug 2023 10:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691515044; x=1723051044; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RaKiTBiaD9BsjOO0Nilkq1si5mCIBl34JpYb7gEASig=; b=HZtdjIDL+H9BaDEXMdrFR+OFQkzcDoZnD3YHFqV71qAAHBwBLIoR8hsA igH1gSne7mn5NHMmNEZzRvceECnD/xAPq3+JKSyIIlE/bxVmfrCbmMw/x w6QdLGqXDMsm+JNnKzP+BKNo6LlDS0js1B0BlrZAiRWjD2iKDvARl/FdT R1zxSyH2NIUI65ASDOMG5UmBJOf1yeUTq7oxveQ7iuyQoRcWc/QpYk10h mlZQiAsSHU5VkLhEM6Igsz1wIWyebpuZOlGbcvmE2MGSWfjPa17Ts6tR4 lTPyuiS/uKP/L6PpqkQGoZ+0tbvwLNtnatgW4TvDY+c3Hdd5hRY/sbt7o Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="360970361" X-IronPort-AV: E=Sophos;i="6.01,156,1684825200"; d="scan'208";a="360970361" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2023 09:24:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="845525000" X-IronPort-AV: E=Sophos;i="6.01,156,1684825200"; d="scan'208";a="845525000" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 08 Aug 2023 09:24:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2C1A21B4; Tue, 8 Aug 2023 19:28:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Greg Kroah-Hartman , Antoniu Miclaus , Jonathan Cameron , Gerald Loacker , Gwendal Grignou , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Cc: Daniel Scally , Heikki Krogerus , Sakari Ailus , "Rafael J. Wysocki" , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron Subject: [PATCH v1 0/6] iio: Introduce and use device_property_match_property_string() Date: Tue, 8 Aug 2023 19:27:54 +0300 Message-Id: <20230808162800.61651-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1773697918581877022 X-GMAIL-MSGID: 1773697918581877022 At least 4 drivers in the kernel are open coding functionality of proposed device_property_match_property_string() helper. There are also more existing users, but I want to limit this to one (biggest user so far) subsystem. Hence, assuming Greg KH is okay this can be routed via IIO (and again via Greg :-). The +28 statistics in particular due to documentation. With more users converted we may actually get rid of some lines of code in the future. Andy Shevchenko (6): device property: Use fwnode_property_string_array_count() device property: Add fwnode_property_match_property_string() iio: frequency: adf4377: Switch to device_property_match_property_string() iio: frequency: admv1014: Switch to device_property_match_property_string() iio: magnetometer: tmag5273: Switch to device_property_match_property_string() iio: proximity: sx9324: Switch to device_property_match_property_string() drivers/base/property.c | 37 ++++++++++++++++++++++++++++- drivers/iio/frequency/adf4377.c | 16 +++++-------- drivers/iio/frequency/admv1014.c | 31 ++++++++++-------------- drivers/iio/magnetometer/tmag5273.c | 10 +++----- drivers/iio/proximity/sx9324.c | 24 ++++++++----------- include/linux/property.h | 12 ++++++++++ 6 files changed, 79 insertions(+), 51 deletions(-)