Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp123527pxb; Thu, 20 Jan 2022 10:04:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJywbsA3qJxmXCJvUdegRcqwHDp7h1zAso7zKyX4VIeGmkADNtrvy6d6YGFDlNKhx99wtCvP X-Received: by 2002:a63:8f09:: with SMTP id n9mr32440994pgd.308.1642701857422; Thu, 20 Jan 2022 10:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642701857; cv=none; d=google.com; s=arc-20160816; b=nbc2bN51t3LQNqfWHo22FRc66+Qn8aDD8x6bztqTws4UTo3FBudOyN5LCnV8VcO5co qOhhApj+mlaQXA5QxQ8oBG1ZAr0ecw4gcEOJIUNu9kiEK+OC02fqbU6ByTXc5KOWGs9m /xUA20ej6qn5F/nAly6EHRLqsV372X2N/8fsXwq4bTddKgLa27xJAcEn5F8rWJJpyRrZ nzXFeHpm2BPohgo5s8uy3ucr4HqoMgfU9zxRLOuDrlqljzTpowkwdphtLPM5KxNnYcKp GuUqCS8Ldv2MlyP/W+k+ZOhNKtnn9bYYGJXjqFokVHsDA5N3luu2g0pjhSzIxIRTZHPr 1G8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=T+4KTXN2MyPk5h2NaJWjBVuUnjRXsreM7Vqs8LDWdrI=; b=EktDT+spw/BHAkIEPgY33erqxjhkrdhj4z9iSeCSHPM/vjlJMFliTbhK45JePpk/b8 ICXHCzkw3YAvTgtQyh1CU9PFkDgQBAeDYrgnCBxnoZtMlnrYXPpNyI4f9A4CndWY47GL Y4LjbbzM1JrbZrlJDfsNQkFgUEAXL01CfDchO0680B72GVQzFJgEG0lNmhzBTF0biCyr mDJzsKyxKmTI1sFSCTUVYQP8wQ2wrRpY1ysXfSnaoViUPATGo82IfxkfiiEMiHmloxCs TfLiDexKz8Ru/klSZ34ZMjpnH0y0IkL+KHHyWUSG7mjOKYZvtfenMzJCQU9DJRZFCXFM 6tRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pAn+jxyE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si1980082plg.125.2022.01.20.10.04.03; Thu, 20 Jan 2022 10:04:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pAn+jxyE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347006AbiARRHB (ORCPT + 99 others); Tue, 18 Jan 2022 12:07:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbiARRG7 (ORCPT ); Tue, 18 Jan 2022 12:06:59 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D261C061574; Tue, 18 Jan 2022 09:06:59 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id j2so884343edj.8; Tue, 18 Jan 2022 09:06:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T+4KTXN2MyPk5h2NaJWjBVuUnjRXsreM7Vqs8LDWdrI=; b=pAn+jxyEYSHJdfcoa2E2EcGtseKd1LUSIEE+bIVTWa55oeQ7D1Hw/OGSuWFoAjdI1e KQAVVue4LWWIKuYADHF111mi25qZTlscNogoazDmexf/4sFpQtCqY5mtARGMRqSv4iIr OxPmaUQST1fcuxNbAqcgJ2v1rFGV+exgWuy0QrLnsbnwZzwmXWrrFsrvk+Rb+QAuKJx/ Z3qT/SI0RTIOJ1bTUfBAYGKQe8gpPwS+1uvfnvW3jOlMllk197RS57tw0osZl/qFkCB3 zz82C0Wt7+MfqD4c3Szcjng9Qvto6yGoXkjsx+r5I0Y+rCTKFZi6EAemqMf808HQsP11 QPTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T+4KTXN2MyPk5h2NaJWjBVuUnjRXsreM7Vqs8LDWdrI=; b=0hWslPAu4QBm5zo0rrwwuxhFprGcX6WzGc9ZYjaykn3uCzFyfMFbkpavGG/omFseRV O4a1Y9YKKNAjDjzxs056qTxI06pd3N95rvrgvHC5iGCRhGtiHdVgfo5/AfL7iTZqqeOU sQWCTG1ipD50BfjV0UQ15PxFfOqLZQoWryiya3RIc7Rp6pW+oZO24vMbHJKZjLp+8Y5X 4HqsejWxVXIxJxV3CMdzUS/UdJz9MpMFZJbKGjeQ3QENzzbtH/+3B6GfB+uiejYaj7Re Z6KQbbD/Bl80C7oYGcrVldIDrzo1uny8Q5AzPpyaWsO3X31qEkimU2+IsPM7gyE0vMOl leFA== X-Gm-Message-State: AOAM531EqjMsUXapnCbKAqfCRtoK3zZv+mtiF9NNXsDlK8L7gyYACNDx wLOkwl5xzBhTBAnfB3lWWS1Nu86T5D1TyOiD7QLLsI2Qbv7E4w== X-Received: by 2002:a17:906:7948:: with SMTP id l8mr3262885ejo.636.1642525617578; Tue, 18 Jan 2022 09:06:57 -0800 (PST) MIME-Version: 1.0 References: <20220111115919.14645-1-cristian.pop@analog.com> <20220111115919.14645-2-cristian.pop@analog.com> <20220116115228.1f7b4728@jic23-huawei> In-Reply-To: <20220116115228.1f7b4728@jic23-huawei> From: Andy Shevchenko Date: Tue, 18 Jan 2022 19:06:20 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] one-bit-adc-dac: Add initial version of one bit ADC-DAC To: Jonathan Cameron Cc: Cristian Pop , linux-iio@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 17, 2022 at 8:41 AM Jonathan Cameron wrote: > On Tue, 11 Jan 2022 13:59:19 +0200 > Cristian Pop wrote: > > + st->labels = devm_kzalloc(device, sizeof(*st->labels) * child_num, GFP_KERNEL); > > + if (!st->labels) > > + return -ENOMEM; > > + > > + i = child_num; > > + fwnode_for_each_child_node(fwnode, child) { > > + if (fwnode_property_read_u32(child, "reg", &crt_ch)) > > + continue; > > + > > + if (crt_ch >= num_channels) > > + continue; > > + > > + if (fwnode_property_read_string(child, "label", &label)) > > + continue; > > + > > + chan = &channels[crt_ch]; > ? Not used. > > > + st->labels[--i] = label; > I've no idea how this works... Should be looking for the chan->channel > value as that's what your read uses to index. It's an implicit memcpy(). > > + } > > + > > + return 0; > > +} -- With Best Regards, Andy Shevchenko