Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5988041pxb; Tue, 16 Feb 2021 12:47:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTv/KjuRzdyRLMd98dDwSrJ4IDeRA5DTq9hyweZrMaciU5QbLFW5jN65l2dfWFQHmPlrMM X-Received: by 2002:aa7:da55:: with SMTP id w21mr23669518eds.138.1613508451532; Tue, 16 Feb 2021 12:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613508451; cv=none; d=google.com; s=arc-20160816; b=c9AAV7z+buq9NJwzHXoxWhEj1fgWJ5ZvTzgwsuFftZZT98qNzMYvlPD/tratI5DOA7 +RTvPWY4lXRYP/LKR5+7S3CvsQsyhpJDiIxrNXNOpWouNarInM0VcmuhRs+TB04/tfSe aiB8p4DlxHxUdvVkG9tYaBgGofp3VqvmHTHwegdfSpLkyLMrb0xVA8i/tws2xqqrEE53 xI8IJIfpNQAawQsHK94ZR7iGdfDNNH/TnW7yRtnGpAvuJnVe+qCMkgQOe4tJLLc+aKdI eAIDWzBmDd3K1opbhUDL/uwPydCjFdUye05JpWDn5J/iISaJqu9iXqAEutCCcKCkjgUT w3Vw== 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=8j/fx4cNUbIQDDOQwcHGXAcXq0FjjPipFfALSDR7xYM=; b=zHH9y4lnon643fA4rWGKKk0DWo6VmhI5AKbFp1SD3962cs4TL9zvNJEg1kRUw+LQjP lMG0T96kfh2x9Whe4HzFIsWO3gzqthpUL2k0+/KAZIanIpNCMCO9RD96bs0B425riVAi HsgYP8EIM62NDqr8/50Lar3cy4OjKpEIo7fC4A2F12LbfJCkw5gSd01SEgbYAw/+Knqc kGSbFZoHpcK16ExomgYbpunGOMiXaRnzSNpQd8Dg39qxaWS9uYxKPpi193+JsNzPJJql 9c4xS9FXOqK+ZIjZUj3CzUVgMZL+/qAtnY5RLkvdq8lDEliEiKtUkA26MTaoRA0TGTVX RGEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mktU5rtJ; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l19si14915549eji.537.2021.02.16.12.47.08; Tue, 16 Feb 2021 12:47:31 -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=@kernel.org header.s=k20201202 header.b=mktU5rtJ; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbhBPUps (ORCPT + 99 others); Tue, 16 Feb 2021 15:45:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:36344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbhBPUpo (ORCPT ); Tue, 16 Feb 2021 15:45:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CF1B664E0F; Tue, 16 Feb 2021 20:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613508302; bh=rOeuFZ6Y/l/ecXy81XM0438EC3ZMAbCvHSH0pFo/szA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mktU5rtJ2BanR+JPWtkUuUxMnhAsk1Wcw6C130rlEY2RXTZ8/ZjOdUJbhhRW0kzYE 8xQyHir3X0JDGFoodBAuuqg9jhfrAMMu9j6UFgSX3H/pnXO4m7GNsiYltPNYAOIwbf hcl1/L4b6P9/KdAQcQfUx8YoexEaWXh18aj2/XzZNg9qCfeYOTEaPQ7vv2g4iLhlmr ZO9fNvCKSQ+iZgDFpx1h4CRSS2INHcro124M5pL442lEBVZN3NeEiZ0cYe2aUnSltD Ji2WjzQYLir9DSUWtbasCLFrrbBw5UnOEg4UBCcPpwmyQKVoS8zUgSr3eT2o5SbR0S W8omgMSeEMFqA== Received: by mail-oi1-f178.google.com with SMTP id h17so8721944oih.5; Tue, 16 Feb 2021 12:45:01 -0800 (PST) X-Gm-Message-State: AOAM532AaFyM/OCd4tl7igqcZY09clrrZJEN9lfWVMH/i0YbwxdxIHDs M0Y9D1aXDQvC/oPbKQc/iPsDuJ3lgeoQGTfNjOI= X-Received: by 2002:aca:e103:: with SMTP id y3mr3589679oig.11.1613508301169; Tue, 16 Feb 2021 12:45:01 -0800 (PST) MIME-Version: 1.0 References: <1613012611-8489-1-git-send-email-min.li.xe@renesas.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 16 Feb 2021 21:44:45 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next] misc: Add Renesas Synchronization Management Unit (SMU) support To: Min Li Cc: Derek Kiernan , Dragan Cvetic , Arnd Bergmann , gregkh , "linux-kernel@vger.kernel.org" , Networking , Richard Cochran Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 6:10 PM Min Li wrote: > > > If I come up with a new file and move all the abstraction code there, > > > does that work? > > > > I think so, but it's more important to figure out a good user space interface > > first. The ioctl interfaces should be written on a higher-level abstraction, to > > ensure they can work with any hardware implementation and are not > > specific to Renesas devices. > > > > Can you describe on an abstract level how a user would use the character > > device, and what they achieve by that? > > This driver is meant to be used by Renesas PTP Clock Manager for > Linux (pcm4l) software for Renesas device only. > > About how pcm4l uses the char device, pcm4l will open the device > and do the supported ioctl cmds on the device, simple like that. > > At the same time, pcm4l will also open ptp hardware clock device, > which is /dev/ptp[x], to do clock adjustments. I can't help but think you are evading my question I asked. If there is no specific action that this pcm4l tool needs to perform, then I'd think we should better not provide any interface for it at all. I also found a reference to only closed source software at https://www.renesas.com/us/en/software-tool/ptp-clock-manager-linux We don't add low-level interfaces to the kernel that are only usable by closed-source software. Once you are able to describe the requirements for what pcm4l actually needs from the hardware, we can start discussing what a high-level interface would look like that can be used to replace the your current interface, in a way that would work across vendors and with both pcm4l and open-source tools that do the same job. Arnd