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: 13346820 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 5B76FC04FDF for ; Tue, 8 Aug 2023 18:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231611AbjHHS6F (ORCPT ); Tue, 8 Aug 2023 14:58:05 -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 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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(-)