Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10299471rwb; Fri, 25 Nov 2022 03:22:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zUIzFYj8U05/GIMyI8bzGoKNy5T8istV5m9NxPHRlTF/QjLfDnLBR7wYXiw5c/whsNDEn X-Received: by 2002:a17:906:a050:b0:78d:47c8:e80f with SMTP id bg16-20020a170906a05000b0078d47c8e80fmr31605722ejb.700.1669375323171; Fri, 25 Nov 2022 03:22:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669375323; cv=none; d=google.com; s=arc-20160816; b=Cj/q1cbXM+Goqxidd96pmTMfyWOl+qw8/eifnLwrqAtvMBYK+UsujybkKPVIcWRtK2 xnIXDbxEx0OOY6tLs7KM3R2NQFMjeXMvTZBrooHpF9f3O/SEtyOl5WZKUQwCIv52cWnh Odoztcv3BSj9TZ2viGLtgzDPuDLj/IgbjKy6hfYlfKtY4flwlevl2+2UHzHaCMJLMYAf /msCKQrRu8cYLLyVC82poeON7GPVzYdDWjZ16XR30WQhUWb/gm27U1d8Qo0qznnCgcsd F00bNLwLBY6IdB9kb+KiKXIBYo7fbIkEyuEXbfBy7Y/e1hiaz8AGQbB5j+30YRmfdTHG hhhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OObzHBEdjBoEkLEvVmhkAqDPyG7uBTbr+vCOc+XOIj0=; b=05/VByYceCHorrj3HEkBDBnknEHVoRWH/I52mc0IJtvuByzaqT1pnCFDAsK7gKqOAO sEQjJrLUwJzlE9P74DBRCv2hSK6BNQLCzIONp3tAPPPERnHft2Xy+NN5rn6KBI9IIjfq lMh6VuVxNWGdLx+fKgKuzkb1AsbS7lUzuKrd2dsjAeoPdcjVfbbqH0SyMKrWdndjA2YW 0XNTpm8vV9z5Q3+MVrE8mFNflCnbZDL+K5H/uhBfB9sigJQVzSD7m09u8D8uXANuzm+h cptB4rAgFweabWrJNDScqhD0CFXr75U6wJE9we7cbHs4vVzbEW3bVGbMsixwCByFr/LJ DAWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DYuegUBY; 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 a16-20020aa7cf10000000b0046909d2f445si2989244edy.535.2022.11.25.03.21.39; Fri, 25 Nov 2022 03:22:03 -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=DYuegUBY; 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 S230145AbiKYKpQ (ORCPT + 87 others); Fri, 25 Nov 2022 05:45:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiKYKpP (ORCPT ); Fri, 25 Nov 2022 05:45:15 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0DD622284; Fri, 25 Nov 2022 02:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669373114; x=1700909114; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=LqB7yfOJKehuHE5h/4Sq5Y8vk2FeivJgj9pQckLc+V8=; b=DYuegUBYtdJqUycSrj4CvWgqPuwpPuvkH0YmY13dzwYrV13VH6EfHsfG x7PSU7Aj/rTv8eoPh5ZxC5ZPnfwx9LlgUdbRtXnlHLeREE0K+RegNRbeS eVaatoSBVI41nIvYVYNsjDY7C9irDQALkdPJRL1saTPVLSIJx7l3bx5QO k/yywEvomxrteDV7lGlGuAod7i+4QpZVV6Q4+/0nUA3y+4deNa4YXoyAG /8ZkKnrrMnNfpcXQS04ER/3PXGpK533D8pViOeQy2Uf/vS0uvB3MR7OPg VQ/9xz7MDiLs3IYP7Iqgso9EXOXkbPhutvIZdIRGOAH2vvZyinCXM2Uj2 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="313157736" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="313157736" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 02:45:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="817105952" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="817105952" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP; 25 Nov 2022 02:45:08 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oyWCg-00HC0K-1C; Fri, 25 Nov 2022 12:45:06 +0200 Date: Fri, 25 Nov 2022 12:45:06 +0200 From: Andy Shevchenko To: Gerald Loacker Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Jakob Hauser , Linus Walleij , Nikita Yushchenko , Michael Riesch Subject: Re: [PATCH v3 1/3] iio: add struct declarations for iio types Message-ID: References: <20221125083526.2422900-1-gerald.loacker@wolfvision.net> <20221125083526.2422900-2-gerald.loacker@wolfvision.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221125083526.2422900-2-gerald.loacker@wolfvision.net> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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,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 On Fri, Nov 25, 2022 at 09:35:24AM +0100, Gerald Loacker wrote: > Add structs for iio type arrays such as IIO_AVAIL_LIST which can be used > instead of int arrays. Suggested-by: Andy Shevchenko And thank you for doing this! Reviewed-by: Andy Shevchenko (one comment below) > Signed-off-by: Gerald Loacker > --- > include/linux/iio/iio.h | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h > index f0ec8a5e5a7a..eaf6727445a6 100644 > --- a/include/linux/iio/iio.h > +++ b/include/linux/iio/iio.h > @@ -383,6 +383,21 @@ s64 iio_get_time_ns(const struct iio_dev *indio_dev); > > struct iio_trigger; /* forward declaration */ > > +struct iio_val_int_plus_micro { > + int val_int; > + int val_micro; > +}; > + > +struct iio_val_int_plus_nano { > + int val_int; > + int val_nano; > +}; > + > +struct iio_val_int_plus_micro_db { > + int val_int; int val_int_db; ? > + int val_micro_db; > +}; Actually why can't we simply do typedef iio_val_int_plus_micro_db iio_val_int_plus_micro; ? > /** > * struct iio_info - constant information about device > * @event_attrs: event control attributes > -- > 2.37.2 > -- With Best Regards, Andy Shevchenko