Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6248205imd; Wed, 31 Oct 2018 08:56:57 -0700 (PDT) X-Google-Smtp-Source: AJdET5e6Kz2dnr34EDHlgn9l8bf+eFgzG2WMppuYvSkMQiZRWQrQB7FoxKAgh/RJ+CTMGPAYO4Y1 X-Received: by 2002:a17:902:b109:: with SMTP id q9-v6mr3988959plr.83.1541001417042; Wed, 31 Oct 2018 08:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541001417; cv=none; d=google.com; s=arc-20160816; b=cw9kMflB2wvSoFS/1M2Yc80ih/Hz9MDn3A0fzjGrsqaO4yGNhVr3Ew8TMJ2E4WydkL DIVkAG40BWX0WeQvsAuusZ7K58ivgdZ5lV106caV/cRqEYmUMJG0dDLYK12irLABVYVo saR/jb/CYn1Yu/MIDtaqUiByIId1uKKGw5ivzeVHSaip1DLyGDSl3I8xypegkCxo10iZ V9Ak1T+KB6MLCgB2QRLPOpQWypR5QmH934/YsYzxD3MaSRIScVzMl2QTSQjelqtsry7p LnaGRC4ch40lWQE04rCCIOVeLlg+rskcLkQXthNwc8h65iUgSEDAE+bax2R0XVCp+AML DuDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=0m2bCnfc3Hx5A6TqlQQS1VxnmjoIkF3lh6xONpj9bBQ=; b=yKIC9hoT0nc70Bwm0LgfEuR+qZiMt2Ud6CckHXrFOcFNp94KbddiVD+4eNzpQl//Dm pKvVL7jTzfV9lkcpjPACNuwmk/K3QpR5ore6vutVSS17XaZLFFN71WwopacgKVtVJZPG nBG4iTAFNA9Y7LvCFv0iCmEyEczEvNvpAp35bxkLLo7LKlYx8k239D7ufuWnn4+p5hlI cmhFdIgwCVHoz62SCM0xWaPwwecpj7OJfKESzBImUjiiHsRfXLAvDWXMru0AmjcbKV4P xOTGs4U8LkPQWngp1s64Q1Soxt7loi1QMXHi60Nwc/Yn628fuYkGl27BRw49pPflRn6K ZExQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ftbf+bg3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go3si26461146plb.266.2018.10.31.08.56.40; Wed, 31 Oct 2018 08:56:57 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ftbf+bg3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729722AbeKAAxA (ORCPT + 99 others); Wed, 31 Oct 2018 20:53:00 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38263 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729613AbeKAAw7 (ORCPT ); Wed, 31 Oct 2018 20:52:59 -0400 Received: by mail-pf1-f196.google.com with SMTP id b11-v6so7823060pfi.5; Wed, 31 Oct 2018 08:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=0m2bCnfc3Hx5A6TqlQQS1VxnmjoIkF3lh6xONpj9bBQ=; b=Ftbf+bg3mwRiI1kj4AxGqj+qZAkQPs+BoZCymhHCGCftNySf6/KXY6yZRaAv5rqJEC N/1EY3AO7kTmcTAu/vd6l/2M8xmnMzVm1wbYAHITCUjKXdXtSRc2KNva5VfTA1umIF+R puGbaH7ekb+9GWerwn3W5/ZUbE/syLcqYbi3s9skwYvYHNx59WcDlgMSKUt7NoBU+yh1 5NLn2HFuYPTiHlz+ba2G17/55qVxcyh8CU83p0ipIHNFuBHx+nnBSTNV+8lRiQjck6F1 iNOyHbRyupUe/8OB0YRX6dowumCBcjRBKTNA8y7OjIh6ZUISryXZ7RGyC4MgSTQ+PsK3 Xakg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=0m2bCnfc3Hx5A6TqlQQS1VxnmjoIkF3lh6xONpj9bBQ=; b=hRgaGVNZBQuzeKY/1ZRRZa6kjEg0mSOClJ7bUGkzNFr2SgW+LGlFNGT8Jy8cb8tDmU bRFSuP9Lj+VsV/cI354n+c3EEzF4YMXnZEiz7UazDG+uwr05GPK8M9iCLQvTQIniZZTT 2GfyB9hhI9EtiqMq0Pu0mpuzimk/jjwCgOWs2p5s9q7Md+r7MTdNRo+OqGcTII10eFhF KwxfJGH9J3bEOQys8V3hCH+FzRMKYbyXZNsbF+Z16CUcbjvqopVMm1/MTD6k6OvjB72E 84Z0b6CDasDn4/EjamxO7JNGFIIx6VZaODVWikUYgyUhfdQr2Ki8Fb6Ld892ht+b0lsI 9ThQ== X-Gm-Message-State: AGRZ1gJCVF2lI+1alD5amJdXtIrBoFwOW1B2M/f+OWS/7rF1d340TkK0 C3au51scGKhkBdmmyqSGGlM= X-Received: by 2002:a62:6c49:: with SMTP id h70-v6mr4138647pfc.134.1541001264589; Wed, 31 Oct 2018 08:54:24 -0700 (PDT) Received: from nishad ([106.51.27.228]) by smtp.gmail.com with ESMTPSA id w2-v6sm25930929pfw.26.2018.10.31.08.54.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 08:54:24 -0700 (PDT) Date: Wed, 31 Oct 2018 21:24:16 +0530 From: Nishad Kamdar To: Jonathan Cameron Cc: Slawomir Stepien , Lars-Peter Clausen , Michael Hennerich , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 0/3] staging: iio: ad2s1210: Switch to the gpio descriptor interface. Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the gpiod interface instead of the deprecated old non-descriptor Changes in v7: - Adds a level of indirection to read and write the gpio_desc to make the code simpler. - Drop gpioin flag which decides how the GPIOs are controlled as the GPIOs must be outputs for the host as per the datasheet. Changes in v6: - Split device tree table addition and device tree support addition in two patches. - Replace platform data with device tree support. - Rename boolean property. Changes in v5: - Add device tree support. - Add device tree table for matching vendor ID. - Add Support for retrieving platform data from device tree. Changes in v4: - Add spaces after { and before } in gpios[] initialization. - Check the correct pointer for error. - Align the dev_err msg to existing format in the code. Changes in v3: - Use a pointer to pointer for gpio_desc in struct ad2s1210_gpio as it will be used to modify a pointer. - Use dot notation to initialize the structure. - Use a pointer variable to avoid writing gpios[i]. Changes in v2: - Use the spi_device struct embedded in st instead of passing it as an argument to ad2s1210_setup_gpios(). - Use an array of structs to reduce redundant code in in ad2s1210_setup_gpios(). - Remove ad2s1210_free_gpios() as devm API is being used. Nishad Kamdar (3): staging: iio: ad2s1210: Switch to the gpio descriptor interface staging: iio: ad2s1210: Drop the gpioin flag. staging: iio: ad2s1210: Add device tree table. drivers/staging/iio/resolver/ad2s1210.c | 132 +++++++++++------------- drivers/staging/iio/resolver/ad2s1210.h | 20 ---- 2 files changed, 62 insertions(+), 90 deletions(-) -- 2.17.1