Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp501828ybl; Tue, 7 Jan 2020 09:49:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxE4vzltv3tkcnk9Pkum8M7hXr8ivccFQ4zR8YehTpwJniiI3Q/o3g6r5EbVyE01Z4Lqm/y X-Received: by 2002:a05:6830:4c2:: with SMTP id s2mr1034467otd.144.1578419383517; Tue, 07 Jan 2020 09:49:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578419383; cv=none; d=google.com; s=arc-20160816; b=OEGRfbKwrf3uoP1zrJ4dzzOgk91xbgltNf+r3/bG+z0hQ+3LGQcQTJw268lL41i1Mi U4aqlirFIeLfSKcsmzbjOfRMLtqw3Ycm/UojgQRqDj1FKZnhXC/ZX4oWnjAVjjJUCTb0 3N7T70CddxiOCAyA6YZcHOYrAuX3zDJ1GdC4B5ra8ArkAnXLjAnuA4idLSBKIQk+xm45 xg+w320XAkvLdbptAR5zOUrqS+S18if9ijxYc33DXNfZIFRWSDG7xQnP4PVyeFD432sV 7YarrNRIIy4cWhUFNZ1tLvYA+EEg7Un9+7gj5SX3S8dPa97c/gRlg04SYqwy1Wcs2trf 7YXQ== 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; bh=hVfz8lO6ccTxsvm5i5b2ERPDVtNx8+e04rxKh3IYDLc=; b=gcxEPRMnHDP3cQORKiJEUenF8607MIVkZofD2niuvMOFxmrrXWPLV+VoBY7c0BL9Hw IOXCBAqK5cr1+PAi0lruJw6PznkbRcET72kXBRKbysxSHZHYmrU+ePlqf8Uq+6N9A43x X8+ShBEkE0zaa7whsv9X/iZ/OanwEgXhZr4kv1+ANi4YiaW62i9qnSHqcuQYbekx0GBS 21/P1JEmfckBe7OrfObHOAbeoMiQU9N+X/MEoib6aMa9YL1Ji64UMN2683/U+DS77tB+ csGLk9yheHVUlaAVu7MMmougWaa/EjvCgX4mTv6benKDlwlqbOyvvdSNYVodvj6YAzsN +KCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si263532otn.117.2020.01.07.09.49.31; Tue, 07 Jan 2020 09:49:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728642AbgAGRse (ORCPT + 99 others); Tue, 7 Jan 2020 12:48:34 -0500 Received: from sauhun.de ([88.99.104.3]:53350 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728588AbgAGRsX (ORCPT ); Tue, 7 Jan 2020 12:48:23 -0500 Received: from localhost (p5486CF8B.dip0.t-ipconnect.de [84.134.207.139]) by pokefinder.org (Postfix) with ESMTPSA id 458E22C3955; Tue, 7 Jan 2020 18:48:22 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Wolfram Sang , linux-kernel@vger.kernel.org Subject: [PATCH 12/12] docs: i2c: use the new API in 'writing-clients' Date: Tue, 7 Jan 2020 18:47:46 +0100 Message-Id: <20200107174748.9616-13-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> References: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> 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 i2c_new_device is deprecated, use i2c_new_client_device. Also, align a paragraph while here. Signed-off-by: Wolfram Sang --- Documentation/i2c/writing-clients.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/i2c/writing-clients.rst b/Documentation/i2c/writing-clients.rst index ced309b5e0cc..0336909ca01b 100644 --- a/Documentation/i2c/writing-clients.rst +++ b/Documentation/i2c/writing-clients.rst @@ -175,8 +175,8 @@ Device Creation If you know for a fact that an I2C device is connected to a given I2C bus, you can instantiate that device by simply filling an i2c_board_info structure with the device address and driver name, and calling -i2c_new_device(). This will create the device, then the driver core will -take care of finding the right driver and will call its probe() method. +i2c_new_client_device(). This will create the device, then the driver core +will take care of finding the right driver and will call its probe() method. If a driver supports different device types, you can specify the type you want using the type field. You can also specify an IRQ and platform data if needed. @@ -186,14 +186,14 @@ don't know the exact address it uses. This happens on TV adapters for example, where the same driver supports dozens of slightly different models, and I2C device addresses change from one model to the next. In that case, you can use the i2c_new_scanned_device() variant, which is -similar to i2c_new_device(), except that it takes an additional list of -possible I2C addresses to probe. A device is created for the first +similar to i2c_new_client_device(), except that it takes an additional list +of possible I2C addresses to probe. A device is created for the first responsive address in the list. If you expect more than one device to be present in the address range, simply call i2c_new_scanned_device() that many times. -The call to i2c_new_device() or i2c_new_scanned_device() typically happens -in the I2C bus driver. You may want to save the returned i2c_client +The call to i2c_new_client_device() or i2c_new_scanned_device() typically +happens in the I2C bus driver. You may want to save the returned i2c_client reference for later use. @@ -236,11 +236,11 @@ possible. Device Deletion --------------- -Each I2C device which has been created using i2c_new_device() or -i2c_new_scanned_device() can be unregistered by calling +Each I2C device which has been created using i2c_new_client_device() +or i2c_new_scanned_device() can be unregistered by calling i2c_unregister_device(). If you don't call it explicitly, it will be -called automatically before the underlying I2C bus itself is removed, as a -device can't survive its parent in the device driver model. +called automatically before the underlying I2C bus itself is removed, +as a device can't survive its parent in the device driver model. Initializing the driver -- 2.20.1