Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2367609rwl; Sat, 1 Apr 2023 06:41:57 -0700 (PDT) X-Google-Smtp-Source: AKy350aLJCvCcqwMIEs+3iPjV1/hXpx0ubCgMIgmTeCSTxIia46JcfKGIE+qaa5vDtW2phpvK8FT X-Received: by 2002:a17:90b:3b49:b0:237:62f7:3106 with SMTP id ot9-20020a17090b3b4900b0023762f73106mr32030813pjb.17.1680356516812; Sat, 01 Apr 2023 06:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680356516; cv=none; d=google.com; s=arc-20160816; b=l+wgZjozzc6QvYd1fW2SZAzQHF8Pm5yNWOfaRLsCdiqlp+GUyRB/YM+gIlB541/rg/ qy/xxnkKpNOEPOXb9O1wkh6aJW45vFTjvXBWAHOGTQ4N3V/W5t8XkeE5TtoTUWkEMiia 4qe8sxVCs0UuO/GNnWBlAYAGv9NHbVJt4YWQawe8UkJm45N0RWtLuu6hVXfqCxfJ4yrf h1C2hBHKpIMnDaYhPxDuM14TRGWprzX4JktOQhHkHBMZhgsJ2pxygdipF5Vf2uZ9sOMy cTo3Wd0HU7/v7Z5wR025zBfblrBHs3BfPzRyEiS3QgHtmACkte7ZUNFKZwHQwDxqZdNu E0tQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=QE8JBoRBAVA+XWHF2n4b09DEgrx1WFlFeujNFfIM31o=; b=IxqQ+vsApW3iU9BBh56LFHD5/nkTehV8g6XPVOKUeDvS1Y33mzZtBcWKDed/kib8Ck UN85E49MvCeuq/W5v5iPUhTiHXd+QJeHEJagT3GH5lG+vryNoWXGQwEWqZhE7ZrO/hL7 KHFDjJFyNbv/fBHt5e541Ft04lzDGMgXi2VAwxKdP4Uvm4a5nE39RaTh63+aqGvIcaqT DYL5Lq3fMZi0JkuT94m3ExozUx+MFXWVxZGDCvz1AC+t29HcdqVHOiDoQ1dJz67RHIet ZQCQM394UEKaAXzncO/5T2v7+Zj4xOu2u969Z3p8M1L9JRdejnq+2s7HOsxFbibIhxdk caHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tQYecD6C; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a17090b069200b0023cfda36390si8630967pjz.121.2023.04.01.06.41.45; Sat, 01 Apr 2023 06:41:56 -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=@kernel.org header.s=k20201202 header.b=tQYecD6C; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229792AbjDANeB (ORCPT + 99 others); Sat, 1 Apr 2023 09:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjDANd7 (ORCPT ); Sat, 1 Apr 2023 09:33:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B417191DF; Sat, 1 Apr 2023 06:33:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E9FF160E26; Sat, 1 Apr 2023 13:33:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32551C433EF; Sat, 1 Apr 2023 13:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680356037; bh=GoAwsdWrReTo+aUQUGqZo7eRCiNX4xBnQGE0c+74wfI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tQYecD6CA571Svm2DJG1YVzpTDWRQ4wZLu9qhFJ4Y8RjTsTrFKqxl6Uysnab6Ow9l R7fkOKgaw/+UpyLIlRlqkPPlFMQMqSwk2SXlSWe0N0B62/9oSO5/9SI2snHxPM5gYw pxCtmLLWMnVpxRMVI93hVSC8qnCxqT1Cbcbd/XVMW2vEztma+GblDt9qIjZUgwy/gz mojgxVCY0xgjjFVBka3xeS2u3M7r4FW4q7t0LfWB/H74Ul1seSyBNGXvVdX1DY7O9o aWRh4ZpnGXR9HqINHpK8uVJbcLH04re7FquMk7H9Yd+eMF/ij7f7PYTlbLPxmzrNwm Aj/Kg/CZ5GsVA== Date: Sat, 1 Apr 2023 14:49:06 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: William Breathitt Gray , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] iio: addac: stx104: Migrate to the regmap API Message-ID: <20230401144906.709558bd@jic23-huawei> In-Reply-To: References: <4ebc1b6b609a086846420954b893e914fd395384.1679867815.git.william.gray@linaro.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 > > > + gpio_config = (struct gpio_regmap_config) { > > + .parent = dev, > > + .regmap = dio_map, > > + .ngpio = STX104_NGPIO, > > + .names = stx104_names, > > + .reg_dat_base = GPIO_REGMAP_ADDR(STX104_DIO_REG), > > + .reg_set_base = GPIO_REGMAP_ADDR(STX104_DIO_REG), > > + .ngpio_per_reg = STX104_NGPIO, > > + .reg_mask_xlate = stx104_reg_mask_xlate, > > + .drvdata = dio_map, > > + }; > > Not sure of compound literal is good to have in such case, but if > Jonathan asked for that... I didn't like the separately zeroing of the structure in a different place in the code. This avoids that (but then so would using an explicit memset just before filling the rest in.) Jonathan