From patchwork Sun Oct 28 07:49:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishad Kamdar X-Patchwork-Id: 10658509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE4E8161F for ; Sun, 28 Oct 2018 07:50:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EAFF29EB0 for ; Sun, 28 Oct 2018 07:50:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C41D29ED6; Sun, 28 Oct 2018 07:50:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54B4929EB0 for ; Sun, 28 Oct 2018 07:50:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbeJ1Qd7 (ORCPT ); Sun, 28 Oct 2018 12:33:59 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42849 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbeJ1Qd7 (ORCPT ); Sun, 28 Oct 2018 12:33:59 -0400 Received: by mail-pg1-f194.google.com with SMTP id i4-v6so2409219pgq.9; Sun, 28 Oct 2018 00:50:07 -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=fp/9xhOD4HmbDF1HFdOd79Yf2CXGwv8kOhhb6d8fvHQ=; b=DRPlWHmXfEgKDLuQEObzbRdPkOOjwSCmj5kq+n2EoPDdn82EGIbPvygnk9YknrWawt /UYZ44J5dukNMGgdPFgOg7e42UlF4KOC/bK1ZKdtX03rZ6Fu7XUTAN7ukRpNsph1XzO9 qWyzZ+Z9Ohs4++QVlOHY/XxRwJM3RI8NLMxmHgczSXP8rCB0pEAmzy6SqNPmwwbXQ8PM zBilOx9IBaC/S2a40/pFvFtsvu9yNnZaX04sTNglTxvu4mn8Jd9ksf4iyxtK8MzX02i2 sEfQRjubVtFd6JB3PmC1FgnqelumTNaYIC7boht3Qg886Wqep7DKD/0zhAgKQ6qz0vJ/ 3Xew== 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=fp/9xhOD4HmbDF1HFdOd79Yf2CXGwv8kOhhb6d8fvHQ=; b=li7Zv29nh+su1nBbvLBady1/uo5ivIAE3SY5SVQ6aJ4+uZXCPfeYbSD9qiBoDqnXY8 Wqagz2tpXdTH8NhgB11QD6Fbf2Y+ngYShz8towNoX11ugWjwh4uj2u6JzwPDwS4b78rq mKzxD5sLJk/9Djz7AC585jYIGLPU5/zlGASL8vLhvXq8K0IcHXForFDWDZfYBMVL4DLV acH6azAxTxbx2rxLwn1jbrxGwBW0phFKr0E+evTknFIGVx4Msd9L0ln1hCYIaFpMzht3 vIwTpo2blcCyAoLROSWeCZcYPZI/5vQ7aLVWplnHZGcbVUtJLT0ZFNyCwUoNkMMRUzpN gHaw== X-Gm-Message-State: AGRZ1gImcHUKkb36vSvjZsvvMicPOnLnaYL9ECOoC0kXNIPVUMvl6mY1 0UmkHJg5SqVVlGSFDgwMFjI= X-Google-Smtp-Source: AJdET5crpDOU2ahx1Mt4JQxoeonw7L8bLfKrh/o1ockY1IMkn7fy0V+j+SZC2hJb+bncoCYtyFOhmQ== X-Received: by 2002:a63:ce14:: with SMTP id y20-v6mr9688461pgf.248.1540713006718; Sun, 28 Oct 2018 00:50:06 -0700 (PDT) Received: from nishad ([106.51.27.228]) by smtp.gmail.com with ESMTPSA id t9-v6sm8514357pgl.37.2018.10.28.00.50.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Oct 2018 00:50:06 -0700 (PDT) Date: Sun, 28 Oct 2018 13:19:59 +0530 From: Nishad Kamdar To: Slawomir Stepien Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 0/3] staging: iio: ad2s1210: Switch to the gpio descriptor interface. Message-ID: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the gpiod interface instead of the deprecated old non-descriptor 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: Add device tree table. staging: iio: ad2s1210: Add device tree support. drivers/staging/iio/resolver/Kconfig | 1 + drivers/staging/iio/resolver/ad2s1210.c | 114 +++++++++++++----------- drivers/staging/iio/resolver/ad2s1210.h | 20 ----- 3 files changed, 65 insertions(+), 70 deletions(-)