Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1953551pxf; Sat, 3 Apr 2021 06:08:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUddF4sNG7HbKHxMtzJMOqLNrVwNBZXQfwXIhRn9r4KwQvZqNbwfCoemqVCEvcz/vhnicJ X-Received: by 2002:a05:6402:10c6:: with SMTP id p6mr20725157edu.241.1617455287614; Sat, 03 Apr 2021 06:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617455287; cv=none; d=google.com; s=arc-20160816; b=bcNqQXdJ2NW73TIVofdBeiYb3pHsycw549Js2HtnrvXySM9GPMdFMB02Y5MU5EjcJA P39mLAj+8+zqkpuX+NAIwD02fnMroSOP83R+DHJRrrKqV6HRqlhXm6sz4YPIkfUY8Mln Lkqj4AJpXJkT32KQUbNw6y8owrdnP2E6KUBWi6PIc1quOb6LaznA89HUORjR4Q2iNK7s jUDcTV7Q3JkTFcxlGd4YU458OhaOyGSCZg+td1NkOjyPc7qx7u1K2mVHaRosODVngO5Y Vcl+87jtLmYyfgDHOPpooPf0KPyb55dIvfgy3d31iTfQRttcnUiPQmWLOBaBfLy68hEr EXcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AnBaIdzKyFaOw0joDdYPPv/iDYSh71jQwi7Hy4Fui10=; b=CPWhxlSad4fBOuPYksQmJxnav4ARjmkxX5+Hfc2KNPzybjy3MJtfrXXt5SsF14dSxA DKIhzJ4TEngp1p6uHjSj1pYZxdvwYz43bH5lWswq8It4VIx9KtSeGi5GIvbJVsQ2UwKv 46v3pnsWu/0QXCaHjLITZ6+Y4NQrP2QlkUcLzLKXM5Uu/IDklb22WrNLiy/87o4fNZgm 3TR7+u7wr+pxKotB/07PA0a/fQrHG/L+Xwb0bvtTQhLbC5I4kJcLSQ98B3E6J6cHt/0e BGCubJqHDK8Ue+UX5eLT6erOPtYsQGrk9oPGocFQ+18Vv/ULvIt9m1+9CWa69z+QGvmu NUOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bUFSNb7S; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm24si2034018edb.297.2021.04.03.06.07.45; Sat, 03 Apr 2021 06:08:07 -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=@linuxfoundation.org header.s=korg header.b=bUFSNb7S; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236752AbhDCNEt (ORCPT + 99 others); Sat, 3 Apr 2021 09:04:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:37916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbhDCNEs (ORCPT ); Sat, 3 Apr 2021 09:04:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3354961003; Sat, 3 Apr 2021 13:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617455085; bh=aEvZ8An5fd9WWJ1+C/eoC5o1H8WT49ZOWyAaePYPi/I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bUFSNb7Sb1L6WYQs9Is5USeCkk48rOdMkAkf/MPtnkVf1bLyCcaODEy7+oyzAW1Ph bWZxa9CqNstb8jwVVgwqodwnBtA4qGl4evXTd4zG0b05udogNvaMmWc4GO/w8CmuA8 2aJN/FKbmMpOIAqQA/Z/QHb2xYpjMEVBTyO6IvLo= Date: Sat, 3 Apr 2021 15:04:42 +0200 From: Greg KH To: Manivannan Sadhasivam Cc: corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] docs: driver-model: Update the documentation for device class Message-ID: References: <20210403120050.4756-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210403120050.4756-1-manivannan.sadhasivam@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 03, 2021 at 05:30:50PM +0530, Manivannan Sadhasivam wrote: > The current documentation about the device class is out of date such > that it refers to non-existent APIs and structures. This commit updates > them to the current device class APIs and structures, removes wordings > that no longer valid while trying to keep the original content intact. Thanks for working on this! One thing that instantly jumped out at me: > -Class drivers can export attributes using the DEVCLASS_ATTR macro that works > -similarly to the DEVICE_ATTR macro for devices. For example, a definition > +Class drivers can export attributes using the CLASS_ATTR_* macros that works > +similarly to the DEVICE_ATTR_* macros for devices. For example, a definition > like this:: > > - static DEVCLASS_ATTR(debug,0644,show_debug,store_debug); > + static CLASS_ATTR_RW(debug, 0644, show_debug, store_debug); CLASS_ATTR_RW(debug); is the correct way to write the above, what you added there will not build. But a meta-comment, should stuff like this go directly into the .c files itself so that the documentation is created automatically? the fact that this lives so "far away" from the source ensures that it will always be out of date. I know other subsystems (graphics, v4l2) have tied the documentation into their code files much better so I think the build and markup infrastructure is there today to do this. thanks, greg k-h