Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2015127ybz; Thu, 30 Apr 2020 09:21:29 -0700 (PDT) X-Google-Smtp-Source: APiQypKRd7yFcDPgTNVOlPbWwdzqdQr8pn/m7X+iezLED4mGhyDa0qTwUBwBE/WxzCeq+nE8o5FE X-Received: by 2002:a17:906:138c:: with SMTP id f12mr3518392ejc.35.1588263689555; Thu, 30 Apr 2020 09:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588263689; cv=none; d=google.com; s=arc-20160816; b=lYD82hdHKbF1WvI7yyBqwQrs5dhCHOPLr0jw59kNgJ+EzGXVPaerNR0jTVP/xIl1eE b8/uHsM90U/QKJYMLvpwzEMrpCjqDFFQKCer4Jw1bZhFRFaNbR0B/ljUa84cIC66yMso FGsjmYEhGYAFCEkpySMRMBMFsVqsDhe0LPDFtvm4GMbNHqH971wXoCMrsPJIUjnmCnGD iUyhSJRiyU1X+RK6snOJZFLGgOLH9Z3sjGu7wKLZVxsH2UCyyrYO0BJjLaocI1IAc3mC T+0BPdw1c3Pm5ZPIl3hOPWEWZ+odGlrveXJnBfohgea1CSK6XgT/dTGFbzHpLSfo0baH L6hQ== 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=yEyT9Bmr/rG39vXQQPEM+TwxtUTjv5V4k0rvJ+cQ6ws=; b=gFju+AVtndped/zVju2sN/YSNepBP9kDRauCprxIFGcEX1MwyTE8HKi3MlQRqtvTZC fiUTRPjYko34rqNaLLggWcEujjI7nVMYoWaZZM+oDlCOC7KqtDzG1I08vY3LeoQqv3wq iJW2I7v8xjp3YJo3dU7kArCS8D/TcIAI6ityiDEvQFu0U/qiBqFlemmdEWgd4MHcygzD kW+A4/OKhuAda6JP5pPS1nAONIKQ4D7H3f0OXMhYmdkG8X8owJOjPMMT4Ca1l8CPn/EF SLn/Az1Wjsjewyd/IhjheUztT3gE9a2njVR4MgXjWRE75v5Jcd2skDqCeAJtmenjzVsr s0lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZIEkWaxr; 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 a5si57626ejv.381.2020.04.30.09.21.04; Thu, 30 Apr 2020 09:21:29 -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=ZIEkWaxr; 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 S1727806AbgD3QSp (ORCPT + 99 others); Thu, 30 Apr 2020 12:18:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:58618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbgD3QSi (ORCPT ); Thu, 30 Apr 2020 12:18:38 -0400 Received: from mail.kernel.org (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (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 C272E2173E; Thu, 30 Apr 2020 16:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588263517; bh=1HSEtM//mtsWijKO6s3LsrrY5g4LGqp0ULlRYJzv8go=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZIEkWaxruoI8rsJBH/VsKhH81CfBr1pX/uYW/ta2Pj4pE70cPG45WjjB5FDkbzM79 RkjX4fa8QqnVjXL0DOJpsSzoiksLGXUGI2/shW4AjSSyJH/ZnkumklOlrTo8bYQ8YQ CEXZ9hmPzXDLi47/TRyn/TVFRQ9zu5MtYiMY2D1Y= Received: from mchehab by mail.kernel.org with local (Exim 4.92.3) (envelope-from ) id 1jUBtU-00Axh8-1g; Thu, 30 Apr 2020 18:18:36 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Michael Hennerich Subject: [PATCH v4 07/19] docs: misc-devices/pci-endpoint-test.txt: convert to ReST Date: Thu, 30 Apr 2020 18:18:21 +0200 Message-Id: <5e6389e49965a39d5ea5face113848671409bb7e.1588263270.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.25.4 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 - use title markups; - mark literal blocks. Signed-off-by: Mauro Carvalho Chehab --- .../{ad525x_dpot.txt => ad525x_dpot.rst} | 24 +++++++++---------- Documentation/misc-devices/index.rst | 1 + drivers/misc/Kconfig | 2 +- drivers/misc/ad525x_dpot.c | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) rename Documentation/misc-devices/{ad525x_dpot.txt => ad525x_dpot.rst} (85%) diff --git a/Documentation/misc-devices/ad525x_dpot.txt b/Documentation/misc-devices/ad525x_dpot.rst similarity index 85% rename from Documentation/misc-devices/ad525x_dpot.txt rename to Documentation/misc-devices/ad525x_dpot.rst index 0c9413b1cbf3..6483ec254520 100644 --- a/Documentation/misc-devices/ad525x_dpot.txt +++ b/Documentation/misc-devices/ad525x_dpot.rst @@ -1,6 +1,8 @@ ---------------------------------- - AD525x Digital Potentiometers ---------------------------------- +.. SPDX-License-Identifier: GPL-2.0 + +============================= +AD525x Digital Potentiometers +============================= The ad525x_dpot driver exports a simple sysfs interface. This allows you to work with the immediate resistance settings as well as update the saved startup @@ -8,9 +10,8 @@ settings. Access to the factory programmed tolerance is also provided, but interpretation of this settings is required by the end application according to the specific part in use. ---------- - Files ---------- +Files +===== Each dpot device will have a set of eeprom, rdac, and tolerance files. How many depends on the actual part you have, as will the range of allowed values. @@ -24,23 +25,22 @@ and may vary greatly on a part-by-part basis. For exact interpretation of this field, please consult the datasheet for your part. This is presented as a hex file for easier parsing. ------------ - Example ------------ +Example +======= Locate the device in your sysfs tree. This is probably easiest by going into -the common i2c directory and locating the device by the i2c slave address. +the common i2c directory and locating the device by the i2c slave address:: # ls /sys/bus/i2c/devices/ 0-0022 0-0027 0-002f So assuming the device in question is on the first i2c bus and has the slave -address of 0x2f, we descend (unrelated sysfs entries have been trimmed). +address of 0x2f, we descend (unrelated sysfs entries have been trimmed):: # ls /sys/bus/i2c/devices/0-002f/ eeprom0 rdac0 tolerance0 -You can use simple reads/writes to access these files: +You can use simple reads/writes to access these files:: # cd /sys/bus/i2c/devices/0-002f/ diff --git a/Documentation/misc-devices/index.rst b/Documentation/misc-devices/index.rst index 68b43e140641..a72ab89e7d1a 100644 --- a/Documentation/misc-devices/index.rst +++ b/Documentation/misc-devices/index.rst @@ -14,6 +14,7 @@ fit into other categories. .. toctree:: :maxdepth: 2 + ad525x_dpot eeprom ibmvmc ics932s401 diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 99e151475d8f..9388743d78e3 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -24,7 +24,7 @@ config AD525X_DPOT AD5271, AD5272, AD5274 digital potentiometer chips. - See Documentation/misc-devices/ad525x_dpot.txt for the + See Documentation/misc-devices/ad525x_dpot.rst for the userspace interface. This driver can also be built as a module. If so, the module diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c index ccce3226a571..6f164522b028 100644 --- a/drivers/misc/ad525x_dpot.c +++ b/drivers/misc/ad525x_dpot.c @@ -58,7 +58,7 @@ * AD5272 1 1024 20, 50, 100 (50-TP) * AD5274 1 256 20, 50, 100 (50-TP) * - * See Documentation/misc-devices/ad525x_dpot.txt for more info. + * See Documentation/misc-devices/ad525x_dpot.rst for more info. * * derived from ad5258.c * Copyright (c) 2009 Cyber Switching, Inc. -- 2.25.4