Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp964129pxk; Thu, 10 Sep 2020 03:30:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZcMHLGT0+C1VtopXs5Z53LZij0xvJnos+zcBVmEqmaKIZIoYgw/7wll/T3okc/ANxJVei X-Received: by 2002:a17:906:52c2:: with SMTP id w2mr8279197ejn.389.1599733838724; Thu, 10 Sep 2020 03:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599733838; cv=none; d=google.com; s=arc-20160816; b=03RQYInT0I/KE7vCUyquG9ys0yGKiPZ5Fu2LSutvgYi8LqvjcHA7DJL3h9PjF/hRSc gKRF3Zc1332dalIC1/omPtGw/MtS91V30etpFhysbslGqU0w4a8D63lLpWJJ0687v/BE wxnHKK6v1qt0uBaJnceIf2p9qo1+eUXtXQ5owgP8ZwFp+isvewRMducRA6zaqWxoTDNx exmkgTZJVj1kKqt8+I6y4CQjMDFYgjxwaVWwAWdMeTgadyqpS+kDX+yHL2GEQO8xWNgf XipPrtfv2zjly0yeOcwA7+IQiyR9IIUanHlfCrPu87h02xGgNmdEIxrqkhSkyJxa3nHO 1/hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T62GAuZasDo8paP6Ig9/nLAuoJCNsytQ7I0vmzFNTuA=; b=UfDoCOpWTre785LNSS5DXi+37kzvSmQOPhxLNqnUqrCsrJznfHRTEb7zrnXk45wezt tFu8bqUbmGrlLY8hU6Llc3KipvZRj7Cxp+eABu8qmmDyOStU8pRkgXQYSmBApLgJa8+q DNSF8ecEim7NVi1+wvzoz7ke1f725QPWYvQO1bhxT2VII6MWtUG6Nh9c+gFsZFlZZ1Gv m3d7lmDyQK5GMp0Fif+4KKZZEc8SRissJtmx7oAzE5BIXZQx7SLPMrMOYJLLHyJ58Wmc A2zijoCf+Yl1DVKKS8O4lZMZC2xprBKx1XZHV9vIZkOcNvTAvY5A0uKH1c8GYxp3VjIV 6lZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0FNGjU1g; 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 p13si3320360edh.353.2020.09.10.03.30.16; Thu, 10 Sep 2020 03:30:38 -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=@kernel.org header.s=default header.b=0FNGjU1g; 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 S1730992AbgIJK1W (ORCPT + 99 others); Thu, 10 Sep 2020 06:27:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:35376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727893AbgIJKYL (ORCPT ); Thu, 10 Sep 2020 06:24:11 -0400 Received: from mail.kernel.org (ip5f5ad5ac.dynamic.kabel-deutschland.de [95.90.213.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7D42D21556; Thu, 10 Sep 2020 10:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599733450; bh=uAmqZ5lhgQiIp+ZbTBM+IlrsfVig3NUg8EB06Ii3lck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0FNGjU1gT0b0tH5ePOzeEjjqluZksqgnM2IYSFK0iTuPCj6skx7m1Qjy1Hi/tUcMn PbPjoGs1GUikqdAZ06iCvPeMUFE32rTBkItgyYwxYR1AadrS+GZBwhWqT4e8FwBmBD n5LOYEHzKsZjUmD0quThkBM2HvnXZ/1FeUDBvxOk= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kGJkO-00EINg-AH; Thu, 10 Sep 2020 12:24:08 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: [PATCH 02/14] usb: docs: document altmode register/unregister functions Date: Thu, 10 Sep 2020 12:23:55 +0200 Message-Id: <3a62f4520e8eedfbf701fc67ba8de49ac8e5b9ce.1599732764.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The typec_bus.rst asks for documentation of those two functions, but they don't exist: ./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_unregister_driver' not found ./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_register_driver' not found Also, they're not declared on bus.c but, instead, at a header file (typec_altmode.h). So, add documentation for both functions at the header and change the kernel-doc markup under typec_bus.rst to point to the right place. While here, also place the documentation for both structs declared on typec_altmode.h at the rst file. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/usb/typec_bus.rst | 8 +++++++- include/linux/usb/typec_altmode.h | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Documentation/driver-api/usb/typec_bus.rst b/Documentation/driver-api/usb/typec_bus.rst index 03dfa9c018b7..21c890ae17e5 100644 --- a/Documentation/driver-api/usb/typec_bus.rst +++ b/Documentation/driver-api/usb/typec_bus.rst @@ -91,10 +91,16 @@ their control. Driver API ---------- +Alternate mode structs +~~~~~~~~~~~~~~~~~~~~~~ + +.. kernel-doc:: include/linux/usb/typec_altmode.h + :functions: typec_altmode_driver typec_altmode_ops + Alternate mode driver registering/unregistering ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. kernel-doc:: drivers/usb/typec/bus.c +.. kernel-doc:: include/linux/usb/typec_altmode.h :functions: typec_altmode_register_driver typec_altmode_unregister_driver Alternate mode driver operations diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h index a4b65eaa0f62..5e0a7b7647c3 100644 --- a/include/linux/usb/typec_altmode.h +++ b/include/linux/usb/typec_altmode.h @@ -152,10 +152,26 @@ struct typec_altmode_driver { #define to_altmode_driver(d) container_of(d, struct typec_altmode_driver, \ driver) +/** + * typec_altmode_register_driver - registers a USB Type-C alternate mode + * device driver + * @drv: pointer to struct typec_altmode_driver + * + * These drivers will be bind to the partner alternate mode devices. They will + * handle all SVID specific communication. + */ #define typec_altmode_register_driver(drv) \ __typec_altmode_register_driver(drv, THIS_MODULE) int __typec_altmode_register_driver(struct typec_altmode_driver *drv, struct module *module); +/** + * typec_altmode_unregister_driver - unregisters a USB Type-C alternate mode + * device driver + * @drv: pointer to struct typec_altmode_driver + * + * These drivers will be bind to the partner alternate mode devices. They will + * handle all SVID specific communication. + */ void typec_altmode_unregister_driver(struct typec_altmode_driver *drv); #define module_typec_altmode_driver(__typec_altmode_driver) \ -- 2.26.2