Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp948361rdb; Fri, 20 Oct 2023 04:27:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXBnxV+Qd0dn4CwaaUsrpAQANw6y1bFmnLwyX/0qn7uzAsi3MKX0VFApeAiSuIMwtIJCxt X-Received: by 2002:a05:6a20:e107:b0:158:143d:e215 with SMTP id kr7-20020a056a20e10700b00158143de215mr6750975pzb.1.1697801261184; Fri, 20 Oct 2023 04:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697801261; cv=none; d=google.com; s=arc-20160816; b=P2MmJOBxs9pwLnCO1+ls+PJNfZF/p2ZvihlEqPh6T3AJuB5T+T0qPtGA/wsoxSTwuO rYCCoc2w4xASlJYSSK4BD0awGSMHGjrlMTLwj/zJOVnpw0vO7t2Nb6gdKq7bR2zuH+D9 z5MofFStjlMGYGFXbC8QWlUJ2wWm5bOC8mls0F7aDr7Sg+KauQiGeYx3YpQDxlDk6ioj 11/29ahzcJFccInXGhfnqdc5/B//p56T6HlluQrqfbZYp1es7XSAElphLCTp5yH/ONjR CJmG/FyodOMd68atCh14lrsoyFyYp0zoD26r8ZdenlD+5fcNjvwcpfT6I8YWxKnX/Ifg 1PbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=7+pdWF5ZBrJN4gJNeSfap4LDzaE3Vb969jTJbV75JGQ=; fh=yjt9oC9RrtzYbqFkdkSm4C79cJ9w94dR0aeRcVh7ZCg=; b=OfyI5CY0VX7u7PenuU2dcfNgltwHmsi/UUyWY/P+UVPGZE6/AKQeN7w0aajGwlSA9v px5hz5bT/XNOeM9ikeU1I75+sa4bSnzSmCZml4PLrEQ71JsnPE3Jx7WSyDtBs6AipizN 4YD4qeZc72P92SJT19TRTMSpTm0fzYHdVt+68gqOPca30ne13WIwk7+S7Ciy1qFxQt1w GYdO1CiPdt3PiSut7vPkDnqzYeKavm9ncxJIGAukTAg7AY2QVfTwdlTcZHvkBtTneMAE G+cCcu/jcttlEkbOnor8RXk+g+i6NG3iNlrdwM2NSZwuEGrli5TsW1wxhIzvNQkaNfnd 6Wzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D5uDBi70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id s196-20020a6377cd000000b005ac44f928e4si1578828pgc.152.2023.10.20.04.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:27:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D5uDBi70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 44D0580A3135; Fri, 20 Oct 2023 04:26:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376883AbjJTL0N (ORCPT + 99 others); Fri, 20 Oct 2023 07:26:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376935AbjJTL0L (ORCPT ); Fri, 20 Oct 2023 07:26:11 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18567D52 for ; Fri, 20 Oct 2023 04:26:09 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-53dd3f169d8so963869a12.3 for ; Fri, 20 Oct 2023 04:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697801167; x=1698405967; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7+pdWF5ZBrJN4gJNeSfap4LDzaE3Vb969jTJbV75JGQ=; b=D5uDBi705+WV0ZBE3pzJiJw+0+1v7UCT2ogGLLEY3SH7y8cflEFb5cj7UqNYHgT4mt EA6tF7VXAE6gxbzwQqc/x55atE+NK3L2ilkJzv3Wl3VJdJ4e2FZaVNNPrNoqZjHtoaxT +khJvz3Wp6ogtu+1oZCnbX17S2sfcCvdZ7bfIg670CAcnfXc+W7oRSaWgBskgsFpFNP3 HSxTgbdH4144/vb0X/KXQ7pWAJNMclNeNy6znrEfT63rhZFr8fHGREfHtxlVGJAmkqUp A9FwVGZA+AatI7aKWoPYXr7e5pNXw6KBjvtrcI3bU/Q9Iat4NeTeGoP5MY7l4yuZ2yWz X8Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697801167; x=1698405967; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7+pdWF5ZBrJN4gJNeSfap4LDzaE3Vb969jTJbV75JGQ=; b=Phjj9w/w0mQCW/Fd0ngOkfrcK6w2ro2aGuVW8tVIArMG/JrxNYEyMsSPVd8AkVd5PS 2PN7zeF+/6llcMIN8z2Geq/37bauCQCPu50AyP8AiasPTOOtFpWzOtu2p0A+vI5UxVAt gIoEwOjPp3LbxWIWuh7HU0Mh9XiqZ4rcjhHbQr1v4lLP50qb2CY4jBG9ebTeFrLVg6zy 66wHJNqIb/3cNJSA8f4o/0Ugvd/TM+TXj79Tjp2WodqDPt0JSXwuz84RWwfFyQq5n7Z1 IkrcB2ph4JhC/h+0z9IcvUN1qGCyrRE1h1If/rTM1QlyiVOiTB6jVGcdlzKSxp2Bv3Br zPVQ== X-Gm-Message-State: AOJu0YwR2d9HkzpMVnMfKOLnAqvHDP/sKCczM+rORrOqsGj5Sj04JD2S pbfjBgsjCcB1RazxYKz/t++viQ== X-Received: by 2002:a17:907:3fa2:b0:9b2:d554:da0e with SMTP id hr34-20020a1709073fa200b009b2d554da0emr1086494ejc.69.1697801167600; Fri, 20 Oct 2023 04:26:07 -0700 (PDT) Received: from [192.168.1.20] ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id a6-20020a1709064a4600b009ae05f9eab3sm1302186ejv.65.2023.10.20.04.26.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Oct 2023 04:26:07 -0700 (PDT) Message-ID: Date: Fri, 20 Oct 2023 13:26:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] drivers: misc: adi-axi-tdd: Add TDD engine Content-Language: en-US To: "Balas, Eliza" , Greg Kroah-Hartman Cc: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann References: <20231019125646.14236-1-eliza.balas@analog.com> <20231019125646.14236-3-eliza.balas@analog.com> <2023101917-cork-numeric-dab8@gregkh> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org;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UEciwG/SgNyxBZepj41oVq FPSVE+Ni2tNrW/e16b8mgXNngHSnbsr6pAIXZH3qFW+4TKPMGZ2rZ6zITrMip+12jgw4mGjy 5y06JZvA02rZT2k9aa7i9dUUFggaanI09jNGbRA/ABEBAAHCwXwEGAEKACYCGwwWIQSb0H4O DFH41ZZ3t1Qbk0N9O0FimwUCYDzvagUJFF+UtgAKCRAbk0N9O0Fim9JzD/0auoGtUu4mgnna oEEpQEOjgT7l9TVuO3Qa/SeH+E0m55y5Fjpp6ZToc481za3xAcxK/BtIX5Wn1mQ6+szfrJQ6 59y2io437BeuWIRjQniSxHz1kgtFECiV30yHRgOoQlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 20 Oct 2023 04:26:37 -0700 (PDT) On 20/10/2023 13:18, Balas, Eliza wrote: >> -----Original Message----- >> From: Greg Kroah-Hartman >> Sent: Thursday, October 19, 2023 20:57 >> To: Balas, Eliza >> Cc: linux-kernel@vger.kernel.org; devicetree@vger.kernel.org; Rob Herring ; Krzysztof Kozlowski >> ; Conor Dooley ; Derek Kiernan ; Dragan >> Cvetic ; Arnd Bergmann >> Subject: Re: [PATCH v3 2/2] drivers: misc: adi-axi-tdd: Add TDD engine >> >> [External] >> >> On Thu, Oct 19, 2023 at 03:56:46PM +0300, Eliza Balas wrote: >>> +config ADI_AXI_TDD >>> + tristate "Analog Devices TDD Engine support" >>> + depends on HAS_IOMEM >>> + select REGMAP_MMIO >>> + help >>> + The ADI AXI TDD core is the reworked and generic TDD engine which >>> + was developed for general use in Analog Devices HDL projects. Unlike >>> + the previous TDD engine, this core can only be used standalone mode, >>> + and is not embedded into other devices. >> >> What does "previous" mean here? That's not relevant for a kernel help >> text, is it? >> >> Also, what is the module name? Why would someone enable this? What >> userspace tools use it? >> >> >>> + >>> config DUMMY_IRQ >>> tristate "Dummy IRQ handler" >>> help >> >> Why put your entry in this specific location in the file? >> >>> +static int adi_axi_tdd_parse_ms(struct adi_axi_tdd_state *st, >>> + const char *buf, >>> + u64 *res) >>> +{ >>> + u64 clk_rate = READ_ONCE(st->clk.rate); >>> + char *orig_str, *modf_str, *int_part, frac_part[7]; >>> + long ival, frac; >>> + int ret; >>> + >>> + orig_str = kstrdup(buf, GFP_KERNEL); >>> + int_part = strsep(&orig_str, "."); >> >> Why are we parsing floating point in the kernel? Please just keep the >> api simple so that we don't have to try to do any type of parsing other >> than turning a single text number into a value. >> > > The adi_axi_tdd_parse_ms function does almost the same thing as the > iio_str_to_fixpoint() function which already exists in kernel. > It parses a fixed-point number from a string. > The __iio_str_to_fixpoint is used in a similar way, as I intend to use adi_axi_tdd_parse_ms. > It writes to a channel the corresponding scale (micro,nano) for a value. > > Since the device is not an iio device, using an iio function would be confusing. > That is the reason for creating the adi_axi_tdd_parse_ms function, which is easier > to understand since I don't have to make all the multiplications that are made > in the __iio_str_to_fixpoint function. Why did you skip other comments? Best regards, Krzysztof