Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3203765pxb; Fri, 12 Feb 2021 11:52:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTcC6edKaO6ElD7NdPx6qw7ffcYyXhiC5gvmEJmppQHGzYZ6xfq5LChGivAm+qyWGUAPyl X-Received: by 2002:a05:6402:1014:: with SMTP id c20mr5183009edu.53.1613159568113; Fri, 12 Feb 2021 11:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613159568; cv=none; d=google.com; s=arc-20160816; b=NgmDdx6UqQtRkfqasgEcboZgbtqLIVq0tg1ex+9X+eMuZXVtDWSvf3PLdjnuaGjhkU lEdMxp+AOXqm9KJt7wRjPz46JxVL0A9yQoGsNrTSBuCRfp0tOV1HpIFhCHmHGTiCiuso ft03i1imGBzQzyZ3PSam4LoVbr5D1SWKheA/YpFkxXDdTDVouEgq8Youn+bpyRdkiHy7 REX1d67tfAzxS1SQD3uRI50veJrLMGpjNpYyH/ePtdcoD0l8nQVManV5ODfeubaAGBya brpmPEE78EngpF8/sQcdncHhlw7AGpCF2K4grgG6iE91MEvl9OGLiy5qf7a6lJQgzYO1 erQg== 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=Aoeo4ZmRET4iCkWSTI9OP4IM7ObVNpIC1SV3X0pvBRQ=; b=NBRPPX48Mg/vC3ed2cg/v6XZI0nLUMgvToAbvvhD1GTOOKq8hbNk3Zm1bW9vTmcRcT kg+PRLihe/pWr6THlJupHUTwDuYmXMZbjYZinxyXu4AzO8H0XE9wAfa3ushmtCwcjNf+ cXfQvuBVoQyDjUAf8KBCPh+4+9yGy+Ow9dmSFYQAU9J8UIrJfmfUbsrCgSB2pe5ERLnL 8iP+4gcvYvWo9Py4nqL2oPvBPJiJMNLkIUefXNkl4Y57EIXOv5hgHlxAykiLtcIClLYi U8VVbn7awyunY1t4NfbnnjqyJ5S92hHRUOo/WIOybGg1s8iJ21I9i1Hg9Sy9TYPpbQmx sLQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JhtBFXoG; 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 n18si6604022ejk.69.2021.02.12.11.52.24; Fri, 12 Feb 2021 11:52:48 -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=JhtBFXoG; 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 S230399AbhBLTvj (ORCPT + 99 others); Fri, 12 Feb 2021 14:51:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:48582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbhBLTvh (ORCPT ); Fri, 12 Feb 2021 14:51:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5306C64E2B; Fri, 12 Feb 2021 19:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613159456; bh=+jZNSXASRKJbVihU0PCI0TJ9OGQXrg2LKG1WrjZJIgs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JhtBFXoGZUHWLOqWkA5XyPMUhsah0NvARU8luvp2B85iaT8O2dHlbbQtIEi/q/QVR mzwhMSsKUd8fJ9h7B88cz7n03dKtwUI01NsHni8p8eLkF4Ei18CUXNl+C4GF8YO6TM Ls3bnSUnKb8ZxJTt/VyZxNO/40fhrWr9KlUaRSaeLgDjJw9fZBbhiXIQge2CQfTJ4Z ay84UME2iq9K1PMYwI/4EFBrcSP8HQogW3HZXZ2OYSpiQZ1P/SwPMN/mSjM4HYIIIB omGYSpHaGlPZ5pqWOuimBT8lgbQU1CYCcngQ+ENn6tVqYgvIjQZpggN77U5dq0rqDV heiRtjyotwkaA== Received: by mail-oi1-f176.google.com with SMTP id d20so858070oiw.10; Fri, 12 Feb 2021 11:50:56 -0800 (PST) X-Gm-Message-State: AOAM530YBdEvpvfE+IFP0+B9p6U4JblzpKd8i7IRktvkpwFBj85xnNM2 1Z+7UGBwFSPFwIpEK7ShEVwAKj9LGfQGUjTd898= X-Received: by 2002:aca:d908:: with SMTP id q8mr749970oig.67.1613159455601; Fri, 12 Feb 2021 11:50:55 -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: Fri, 12 Feb 2021 20:50:39 +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 Fri, Feb 12, 2021 at 5:19 PM Min Li wrote: > > > > > Ah, so if this is for a PTP related driver, it should probably be integrated into > > the PTP subsystem rather than being a separate class. > > > > I was trying to add these functions to PHC subsystem but was not accepted because the functions > are specific to Renesas device and there is no place for those functions in PHC driver. It would be useful to explain that in the patch description and link to the original discussion there. What exactly was the objection? > > > > This tells me that you got the abstraction the wrong way: the common > > > > files should not need to know anything about the specific > > implementations. > > > > > > > > Instead, these should be in separate modules that call exported > > > > functions from the common code. > > > > > > > > > > > > > > I got what you mean. But so far it only supports small set of > > > functions, which is why I don't feet it is worth the effort to over abstract > > things. > > > > Then maybe pick one of the two hardware variants and drop the abstraction > > you have. You can then add more features before you add a proper > > abstraction layer and then the second driver. > > > > 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? Arnd