Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp237173pxu; Tue, 6 Oct 2020 05:24:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyopOrxLAdL7gq3Vm736cb3uJGcRc6iTIssYVlx/d0i96ysZairMPuMkiDxj/y3/zYJoQ8M X-Received: by 2002:a17:906:c55:: with SMTP id t21mr5150809ejf.276.1601987056992; Tue, 06 Oct 2020 05:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601987056; cv=none; d=google.com; s=arc-20160816; b=05hKOVY+ZpVYvbarkoZviUr9sbwXMQntQhfd9i5k+oHG6XnL1zatFaocx7DWiGGC6m 4UnH+oFDLFjd6bx8UD+wu3aXMYvOHipbP/hTmLeD0KcB8wgxZmhw2BIyWYU9jOaD/GIb tg3NmQUP1KuZMRFoWNPXp3pQcKaiYt8yu5hLSQ9Q+UjU7RGY4i1N90AqmV/HHxt6GJHP lmrTPc1WH7qeGV/zGTF/A2UYKnfEHZKJutPUKvlWSzxijRkXqMIq4tBmPQjn+EUo30tg +lIGxJVu+Lth5qcKf/Y+tjE8klOwlV1UIHywTNVDgPgrbUts8aDPbkhe6+uO6v1BjBaG jgyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Ajt9ibuYrJxtVllMh28OvHRU7fjyVHlUBUr+BALwdGs=; b=nr9yOqUOBKCJMzrld0UDh2erCX9TlNeLLnp51YP0kS2xFmgQSOOAWCldEMOKh2IXFS N6UNtEe2J6l3oqC65mD+7rQTr1PB5XLJfATDKQcABSSJRbhOxZHOc08kXXMqtGRnI769 nf90WXrGcoQ8wVaF3YzUkVvxUIwTlxtGNnU0cWboGLGvp13TY1bRYSsOB1iwhgdFISLp R5wl0R4OIuB8K1fP2WcNa0T6v48VGKGm0YFoVpm1dusx7epBUoXDP+hQSVfzfvxHd1ci /X1GwR0BT4clRLVVFab1VF3FF3dAEgZdy2VKsootz9PT1wSQvSv4ChBvzZd+aDhU8LJc OUVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vjTotTy8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si1858985eje.414.2020.10.06.05.23.53; Tue, 06 Oct 2020 05:24:16 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=vjTotTy8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbgJFMVz (ORCPT + 99 others); Tue, 6 Oct 2020 08:21:55 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52534 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbgJFMVy (ORCPT ); Tue, 6 Oct 2020 08:21:54 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 096CLMDW003646; Tue, 6 Oct 2020 07:21:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601986882; bh=Ajt9ibuYrJxtVllMh28OvHRU7fjyVHlUBUr+BALwdGs=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=vjTotTy8fD+GFfa5PqIra/Wgd42xLpEb8rqt+cIIuxIvEzDwCcl7dW9AIdXypsbDC 8KJfms0fnZnQULMjPVVVzkSmLN3+r9Fr9UUKHesfas9gv/wCUZDlQid4GrtP/81iZo 4fyMyV6L09NRrncvMcW0zk2uMdDQkfy1V99w0gXw= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 096CLMij011343 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Oct 2020 07:21:22 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 6 Oct 2020 07:21:19 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 6 Oct 2020 07:21:19 -0500 Received: from [10.250.37.2] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 096CLJFt060768; Tue, 6 Oct 2020 07:21:19 -0500 Subject: Re: [PATCH] leds: lm3697: Fix out-of-bound access To: , Marek Behun CC: Pavel , Linux Leds , Linux Kernel References: <20201005141334.36d9441a@blackhole.sk> <3c5fce56-8604-a7d5-1017-8a075f67061e@ti.com> <966c3f39-1310-dd60-6f33-0d9464ed2ff1@ti.com> <20201005164808.slrtmsvmw4pvwppm@falbala.internal.home.lespocky.de> <20201005173227.GA6431@duo.ucw.cz> <20201006093356.6d25b280@blackhole.sk> From: Dan Murphy Message-ID: <144aa75a-4369-cd81-d7dc-2354a9afd7c5@ti.com> Date: Tue, 6 Oct 2020 07:21:14 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All On 10/6/20 6:59 AM, ultracoolguy@tutanota.com wrote: > While I do agree with you that having the child nodes be led strings make more sense, would it be possible to have, for example, three strings controlled by the same label? > > Oct 6, 2020, 07:33 by kabel@blackhole.sk: > >> By the way I just realized that the DT binding in this driver seems >> incorrect to me. >> >> The controller logically supports 3 LED strings, each having >> configurable control bank. There are two control banks. You can connect the HVLED outputs to either control bank A or B there is no individual control of the LED strings. >> But the DT binding supports 2 DT nodes, one for each control bank >> (identified by the `reg` property) and then `led-sources` says which >> string should be controlled by given bank. >> >> But taking in mind that DT should describe how devices are connected to >> each other, I think the child nodes in the binding should instead >> describe the 3 supported LED strings... The outputs in this case are virtual outputs which are the banks (A and B). Since the device is bank controlled the actual current sinks are not defined thus making the the banks the actual outputs. This is why the 'reg' property defines the control bank either A or B and the led-sources indicates the strings associated with the control bank. Dan