From mboxrd@z Thu Jan 1 00:00:00 1970 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 00F5FC4167B for ; Fri, 25 Nov 2022 10:45:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbiKYKpQ (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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