Received: by 10.213.65.68 with SMTP id h4csp496311imn; Sat, 17 Mar 2018 11:54:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELvcZIh2Pb4IR+nyDi1bIs01Y296YicbBHBtYGFliJ94j5spTn+zmzXYSNj6/I7P/LOOWPaN X-Received: by 10.98.218.89 with SMTP id w25mr2536616pfl.209.1521312845329; Sat, 17 Mar 2018 11:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521312845; cv=none; d=google.com; s=arc-20160816; b=KOP7K5SX9+ozVQ49gb5KGQ59xX/ggDKByIodvZLyHY9IjqV377o3qMRLpHpsQarEIv wN6AWEYL5GdmxAY0kr65p5mgW0v42X/yUhFtaSMl9EsZGwcXHzys/snC8rWFXgrpa+lY sm2l+QQFDye0nBnhid/WzVQ+0s34w3iVr1EJ9iUECK9uvU7ktkHrsUW6OHZDvOQ7vVI3 o0EONdZ2O5TetoBSHVo6MRTMuabH79idtl/PeO+J6+kSA+ULJapDchN3DNjOxWP93cWe SJnbfN86MpvS1qQaldZGxtF52UBcUx4Ryrb9fqPOGSiKZ2jMCiU3EWEZO6GARJLcZEIQ GOCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=5FB2YIlnynSH2WRVtAWAHz6RBOVVQ+UTHmnRSKm3Ums=; b=0J5WOCcZRMXcAKTEIYSC3Cwzv4CnBdN5MWpRGnUfUGoPhSF7sW76iWOAFmZMod3mV+ mBDwMIKYCmyqr1ON1mZzVNeUnSNKbArtOJiUAtaDMd0PS5PmOSnGlDTmRBHZzSad7VXp I5yg4izdSdNGauELh3Eluw1diE3oqqyj6wX7HEar5ZlAgbjvUAzmGy7p7e7KmaWxL3M4 ynRg6I9Po4HZI8/fqbNo4QKEtXUZBCJMzrVqAnh0LA5BMzmRwvKdGoMNhklsgVTlEV7v dIwvKLjmupHg42n3IZPdbyAmQtvQUItjSnCiNnX0LpQRLbZxCO/pM3L5iHo7FlArPRcB pjJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bx3qasZ4; 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 a8-v6si8768783ple.435.2018.03.17.11.53.51; Sat, 17 Mar 2018 11:54:05 -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=bx3qasZ4; 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 S1753916AbeCQSvR (ORCPT + 99 others); Sat, 17 Mar 2018 14:51:17 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:40434 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753881AbeCQSvJ (ORCPT ); Sat, 17 Mar 2018 14:51:09 -0400 Received: by mail-qt0-f195.google.com with SMTP id y6so14230568qtm.7; Sat, 17 Mar 2018 11:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5FB2YIlnynSH2WRVtAWAHz6RBOVVQ+UTHmnRSKm3Ums=; b=bx3qasZ4ctag4HQvb0Dsq2jObF+JuDwvZ4uaTjY4m7beOnkE97hGlAHlwXG5mvLkA5 MYgodvy9uSP0xNqyljV7A572TudF+pJUXoLTkCvX5wAUvB4RtiJjwr/FOjRxFn2l7oQP h2IfwqitMMwMjUcz9EsJuBxcrQfnVkkW9ndyZbnLnu96WhLNlzhMq8zffF9J+b4Zqn0C XwZaWoAp3cgxOXL3XLgjtIws/s/ScQg+IT6Krs/m5ikvygNlQbFOaytPFycVAARThzKP e13yaYEWdI8hugNQiFnTTuXSwN5DkbdYGrDEPF0rvKlCTZLEFbs8M/C5IryE8HhDSxgS UAUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5FB2YIlnynSH2WRVtAWAHz6RBOVVQ+UTHmnRSKm3Ums=; b=qVJTnVA3fayFyT0GhuHufHm9zEtnqO1VkxkYrBlw8uHxRsUrminWwx6MbxaluUyf9K Fxq9xNgsFfaUHoIyxiJx/zdhZeiD6mx9eD3P8NzMnRWHCcWrReQv/lyXog/WZDTE0jIA IpgOLV947ZDJARIEvZcACbia1k9bEl5hWb26+qVcN4bQTAx8VHXgIkk1T9tJQ2MqJ59z JYSmiAyfEWciHCm88l64AuP6sMeOD45ExmXbsA8xSKGNVhNbaYRMI6tTA2Xg5Q5r9Sh6 7o7+QyJJpZuuu2gZ80dyhFvk2tAtWFrhrWxrats0DT8UPwtELVexu8FX+SWgbbENapBb hV+g== X-Gm-Message-State: AElRT7HXJmXcvkkHymzgVdU13kyJ5GnegA7iWZWJFMfhMP5Fz5FmSFTE /DSyyRchXtsWpPZW51Mh3tCvHdCMuDmq6oO6maQ= X-Received: by 10.200.25.20 with SMTP id t20mr10041254qtj.187.1521312668363; Sat, 17 Mar 2018 11:51:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.137.74 with HTTP; Sat, 17 Mar 2018 11:51:07 -0700 (PDT) In-Reply-To: <14a09900bf4642495ebe4072b9eb02769dbc4c5e.1521301345.git.vilhelm.gray@gmail.com> References: <14a09900bf4642495ebe4072b9eb02769dbc4c5e.1521301345.git.vilhelm.gray@gmail.com> From: Andy Shevchenko Date: Sat, 17 Mar 2018 20:51:07 +0200 Message-ID: Subject: Re: [PATCH v3 1/8] iio: stx104: Implement get_multiple callback To: William Breathitt Gray Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , linux-iio@vger.kernel.org, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 17, 2018 at 5:49 PM, William Breathitt Gray wrote: > The Apex Embedded Systems STX104 series of devices provides 4 TTL > compatible lines of inputs accessed via a single 4-bit port. Since four > input lines are acquired on a single port input read, the STX104 GPIO > driver may improve multiple input reads by utilizing a get_multiple > callback. This patch implements the stx104_gpio_get_multiple function > which serves as the respective get_multiple callback. > +static int stx104_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask, > + unsigned long *bits) > +{ > + struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip); > + > + *bits = inb(stx104gpio->base); I think on LE and BE if will give you different results. > + > + return 0; > +} -- With Best Regards, Andy Shevchenko