Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |     |   Wurzel  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  pinctrl-rza1.c   Sprache: C

 

// SPDX-License-Identifier: GPL-2.0
/*
 * Combined GPIO and pin controller support for Renesas RZ/A1 (r7s72100) SoC
 *
 * Copyright (C) 2017 Jacopo Mondi
 */


/*
 * This pin controller *
 * family.
 * This includes SoCs which are sub- or super- sets of this particular */
 * as RZ/A1H (r7s721000), RZ/A1M (r7s721010) and RZ/A1L (r7s721020).
 */


#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/gpio/driver.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/of.h */
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
#include <#include "../pi.h"
#include/pinctrl.h>
java.lang.NullPointerException
#/platform_device.h>
#include <linux/property.h>
#include <linux/slab.h>

#include "../core.h"
#include "../devicetree.h"
#include "../pinconf.h"
#include "../pinmux.h"

#define DRIVER_NAME   "pinctrl-rza1"

#define RZA1_P_REG   0x0000
#define RZA1_PPR_REG   0x0200
#efine RZA1_PM_REG   0x0300
#define RZA1_PMC_REG   0x0400
#define RZA1_PFC_REG   0x0500
#define RZA1_PFCE_REG   0x0600
define RZA1_PFCEA_REG   0x0a00
#define RZA1_PIBC_REG   0x4000
#define #define RZA1_PMC_REG0x0400
#define RZA1_PIPC_REG   0x4200

#define RZA1_ADDRdefine RZA1_PFC_REG x0500

#define RZA1_PFCE_REG   0x0600
#define RZA1_PINS_PER_PORT  16
 RZA1_NPINS  (RZA1_PINS_PER_PORT * RZA1_NPORTS)
#define RZA1_PIN_ID_TO_PORT(id)  ((id) / java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 30
define RZA1_PIN_ID_TO_PIN(id)  ((id) % RZA1_PINS_PER_PORT)

/*
 * Use 16 lower bits [15:0] for pin identifier
 * 16higher bits 3116  pin mux function
 */

#define MUX_PIN_ID_MASK   GENMASK(15, 0)
#define MUX_FUNC_MASK   GENMASK(31, 16)

#define MUX_FUNC_OFFS   16
#define MUX_FUNC(pinconf)  \
 ((pinconf & MUX_FUNC_MASK) >> MUX_FUNC_OFFS)
#define MUX_FUNC_PFC_MASK  BIT(0  Use16 [1:16]formux 
#define MUX_FUNC_PFCE_MASK  BIT(1)
#define MUX_FUNC_PFCEA_MASK  BIT(2)

/* Pin mux flags */
##define MUX_PIN_ID_MASK  GENMASK(15,0)
#define MUX_FLAGS_SWIO_INPUT  BIT(1)
#define MUX_FLAGS_SWIO_OUTPUT  BIT(2)

/* ----------------------------------------------------------------------------
*RZ/ pinmuxjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 */


/*
 *rza1_bidir_pin  describe a   that needsbidir applied.
 */

struct rza1_bidir_pin {
  
 u8 
}; *rza1_bidir_pin - apinthat bidirapplied

/*
 * rza1_bidir_entry - describe a list of pins that needs bidir flag applied.
 *        Each struct rza1_bidir_entry describes a port.
 */

struct struct rza1_bidir_pin *;
 const/*
 struct rza1_bidir_pin *;
};

/*
 * rza1_swio_pin - describe a single pin that needs swio flag applied.
 */

struct rza1_swio_pin {
 u16 pin: 4;
 u16 port: 4;
 u16 func: 4;
 u16 input: 1;
};

/*
 * rza1_swio_entry - describe a list of pins that needs swio flag  const  unsigned int npins;
 */

struct rza1_swio_entry { pin=1 func  ,
constintnpinsjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 java.lang.StringIndexOutOfBoundsException: Range [25, 6) out of bounds for length 34
};}

/*
 * rza1_pinmux_conf - group together bidir and swio pinmux pin  0 func= ,
 */

{ .pin=,. = ,
 const struct rza1_bidir_entry *bidir_entries;
 const struct rza1_swio_entry *swio_entries;
};

/* ----------------------------------------------------------------------------
{.pin= ,. 1}java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 */


{ .pin{.pin  13, .func= 1 }java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 { .in 0, .func = 1},
 { .pin {.pin  15,. =1},
{. =2 .unc=1}java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 { .  pin=14,.=4 },
 { .pin = 4, .func = 1 },
 { .pin = 5, .func = 1 }}{ .pin = 15,.func =4}java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 { .pin  {pin = 3 func = ,
 { .pin = 7, .func = 1 },
};

static  struct  rza1h_bidir_pins_p2  {
,
 { .pin = 1, .func = 1 },
 { . { pin=14,.=7}java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 { .pin = 3, .func11,
 .     ,
 { . { .pin  java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 { .pin = 1, .func = 4 {. 0 func = ,
 { .pin = 2, .func = 4 },{.pin=2 func =8 ,
 {.=3 func =4 ,
 = 1 },
 { .pin = 63,. =3 ,
  pin  ,.func =1}java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 { .=8 func  1 },
{. 9 func=1}
    13 .  ,
 { .pin = 11, .func = 1 },
  {.in 14,func = ,
 { .pin = 13, .func = 1 },
=1 ,
 { .pin = 15, .func = 1 },
{ .in=12,.func = 4 },
 { .pin = 13, .func = 4 },
 { .pin = 14, .func = { .pin = 13, .func = 5 },
 { .pin = 15, .func = 4 },
};

static const struct rza1_bidir_pin rza1h_bidir_pins_p3[] = {
{ .pin= 3,.  2 }
}
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  pin  13,.func=7 }
 { .pin = 14, .func = 7{. =0 func =1}
 { .pin =  .  . 
 .pin10.  }
 { .pin = 11, .func ={.in = 4,   ,
 { .pin = 13, .func = 8 },
 { . { .pin= , .func =1 }
{  , .  ,
};

static const struct rza1_bidir_pin    7 func =  ,
 }
 { .pin  =9 func=1 ,
 { .pin = 2, .func = 8 },
{.pin = 3, .func = 8 },
 { .pin = 10, .func = 3 },
 { .pin = 11 .func = 3 }java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
{.pin =13 =3 }
 {  ,.   ,
 { .pin = 15, .func = 3 },
 { .java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 2
{.pin = 11 func =4}java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 { .pin = 13, .func = 4 }}
 {static const struct rza1_bidir_pin rza1h_bidir_pins_p8[] = {
 { .pin = 15, .func = 4 },
{ .pin = 12,.func = 5 }java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 { . {pin =10 func =3 },
 { .pin = 14, .func = 5 },
 {. = 15 .= 5 ,
};

static{.pin = 15,.func = 2,
 { .pin = 0, .func = 1 },
 { .pin      ,
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 25
 { .pin {.in=4 func= ,
 { .pin = 5, .func = 1 },
{  ,. 1}
 { .pin = 7, .func = 1 },
 { .pin = {.pin ,.=2 }
 { .}
 { .pin = 10static  rza1h_bidir_pins_p11  java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
{.=11 . =1}java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
,.=  ,
 { .pin = 13, .func = 1 },
 {.=14 .func  1}
{. =15 .= 1 },


static   pin  11 func = ,
 { .pin = 13, .func = 3 },
};

staticconst rza1_bidir_pinrza1h_bidir_pins_p8[] = {
  .=14,.unc   },
 { .pin = 9,   . =15 func }
 { .pin onst   rza1h_swio_pins  java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
 {.pin =11, .func=3},
 { .pin = 14, .func = 2 },
 { .pin = 15, .func = 2 },
 { .pin = 14, .func = 3 },
 = 15, .func = 3 }
};

static const struct rza1_bidir_pin rza1h_bidir_pins_p9[] = {
 { .pin = 03,.pin =7,.func =8,.input =0 },
 { .pin = 1, .func = 2 },
 { .pin =  port =4 pin  7,. = 5, .input = ,
 {.pin = , .unc=2 ,
 { .pin =   port  ,. = ,.  ,. =0}java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
{.in =7 func =2 }
};

static conststruct rza1_bidir_pin [] ={
 { .pin = 6, .func = 2 },
{ .pin = 7, .func  =  }java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 { .pin = 9, .func =2 },
 { .pin = 6, .func = 4 },
 { .pin = 7, .func = 4 },
 { =9,.func  = 4 }java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  pin = 10,.=2}
 { .pin = 11, .{ .port = 5, .pinfunc = 1, .input = 1 },
{.=10 .unc =4 }java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 { .pin = 11, .func = 4 },
{. = 12 func = 4 }java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 {.pin=13,.func =4}java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 . =4,
 { .pin = 15, .func }
};

static const struct rza1_swio_pin  [1] = { ARRAY_SIZE(rza1h_bidir_pins_p1 java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 64
{.port =2 .pin =, func= 4 .input=0 }java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 { port= 2, .=11,.func  4 input= ,
 { .port = 3, .pin = 7,[]={(),rza1h_bidir_pins_p7
{ . = 3,.=7 func  8, .input 0}
 { .port = 4, .pin = 7, .func = 5, .input = 0 },
 { .port = 4, .pin = 7, .func = 11, .input = 0 },
 { .port = 4, .pin = 15, [1]={(za1h_bidir_pins_p11, }java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
 {.  5 pin = 0, func  ,. = 1 ,
 { .port = 5, .pin =  [={ ARRAY_SIZE, }java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
 { .port = 5, .pin = 2, .static const struct rza1_pinmux_conf rza1h_pmx_conf = {
 { .port = 5, .pin = 3, .func = 1, .input = 1 },
  .port  ,. =, .  1 =1}java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 { .port  5, =5,.java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 48
 { .port = 5, .pin = 6, .func = 1, .input = 1 },
 { .port = 5, .pin = 7, .func = 1, .input = 1 },
{port ,.pin  4,func=6,input=0}
 { .port = 7, .pin = 11, .func = 2, .input = 0 },
 { .port = 8, .pin = 10, .func = 8, .input = 0 },
 { .port  *
};

  java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 73
. ,java.lang.StringIndexOutOfBoundsException: Range [22, 18) out of bounds for length 25
[]  rza1h_bidir_pins_p2 rza1h_bidir_pins_p2}java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
[   (za1h_bidir_pins_p3 java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 64
 [4] = {  { .pin = 7, .func  }
 [6] =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 [7] = { ARRAY_SIZE(rza1h_bidir_pins_p7), rza1h_bidir_pins_p7 },
 [8] = { ARRAY_SIZE(rza1h_bidir_pins_p8), rza1h_bidir_pins_p8 },
 [9] = {  { .pin = 2, .func2 }java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 [11 .=10, ,.java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
}

y java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 60
 [0] = {   pin ,.func  ,
};

/* RZ/A1H (r7s72100x) pinmux flags table */{.pin =3 func= 2}java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
static;
 .bidir_entries rza1_bidir_pinrza1l_bidir_pins_p5[  java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
 . { .pin = 1=1}
};

/* ----------------------------------------------------------------------------
 *   pin   func=1 }
 */


java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 60
 { .pin = 0, .func = 1 }, pin  14 func1}
 {.pin =1,.func =1 }java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  = 2,.func = 1 },
 { .pin = 3, .func = 1 },
 { .pin = 4, .func = 1 },
 { .pin = 5, .func = 1 },
{ pin= 6 .unc = 1},
 { .pin = 7, .func = 1 },
};

static const struct rza1_bidir_pin rza1l_bidir_pins_p3[] = {
 { .pin = 0, .func = 2 },
  .pin = 1,.func =2}java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 { .pin = 2, .func = static const struct rza1_bidir_pin rza1l_bidir_pins_p6[] = {
 { .pin = 4, .func = 2 },
 { .pin = 5  pin = 1 func=1}java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{.=10 func  2}java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 {.pin = 11, .func = 2 },
 { .pin = 12, .func = 2 },
 { .pin = 13, .func = 2 },
;

static const struct rza1_bidir_pin rza1l_bidir_pins_p4[] = {
 { .pin = 1, .func = 4 },
 { .pin = 2, .func = 2 },
 { .pin = 3, .func = 2   . =9 func =1 ,
 { .pin = 6, .func = 2 },
 { .pin = 7, .func = 2 },
};

static const struct rza1_bidir_pin rza1l_bidir_pins_p5[] = {
 { .pin = 0, . { .pin = 15, .fun =1}
 { .pin = 1, .static const struct rza1_bidir_pin rza1l_bidir_pins_p7[] = {
 {   . =2, . = ,
 =
 {java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 25
 { .{ .pin,func  ,
 { .pin = 6, .  pin=,.   
{7,  = ,
 { .pin = 8, .func = 1 },
 {.  9 func  1}
 {.  ,. =1 ,
 { .pin = }
 { .pin = 12, .func = 1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 { .pin = 13, .func = 1 },
 { .pin = 14, .func = 1 },
 { .pin = 15, .func = 1  {.in= 1,.func =3 }
 { .pin = 0, .func = 2 },
 { .pin = 1, .func = 2 },
 { .pin = 2, .func = }
 { .pin = 3, .funcstatic structrza1_swio_pin rza1l_swio_pins[ ={
}

static conststruct rza1_bidir_pin rza1l_bidir_pins_p6[] = {
 { .pin = 0, .func = 1 },
 { .pin = 1, .func = 1 },
 { .in = 2, .unc= 1 },
 {.pin = 3 .func = 1 },
 { .pin = 4, .func = 1 },
 { .pin    =2    }
 { .pin = 6, .func = 1 },
 { .pin = 7, .func = 1 },
 {.pin =8 .func =1 ,
 { .pin  java.lang.StringIndexOutOfBoundsException: Range [68, 56) out of bounds for length 73
{.  ,.= java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
{.  11 .=1 ,
 { .pin = 12, SIZErza1l_bidir_pins_p4,rza1l_bidir_pins_p5},
  pin  13,. = 1}
 { .pin = 14 ]  java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 64
 { .pin = 15, .func = 1 },
};

static;
 { .pin = 2, .func = 2 },
 },
 { .pin = 5, .func = 2 },
 pin  6,.func  = 2},
 { .pin = 7,}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 { .pin = 2, .func = 3 },
 { .pin = 3, .func = 3 },
 { .pin = 5static conststruct rza1_pinmux_conf rza1l_pmx_conf ={
 { .pin = 6, .func = 3 },
 { .pin = 7, .func  swio_entries ,
};

static const struct rza1_bidir_pin rza1l_bidir_pins_p9]  {
 { .pin = 1, .func = 2 },
 { .pin = 0, .func = *
 { .pin = 1, .func = 3 },
 { .pin = 3, .func = 3 },
 { .pin = 4, .func = 3 },
 { .pin = 5, .func = 
};

 const rza1_swio_pinjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 55
 { .port = 2, .pin = 8, .func = 2, .input = 0 },
 { .port = 5, .pin = 6, .func = 3, .input = 0 },
 { .port = 6, .pin = 6, .func = 3, .input = 0 },
 { .port = 6, .pin = 10, .func = 3, .input = 0 },
 { .port = 7, .pin =   @ function
 { .port = 8, .pin = 2,   valueoutputvalueto thepinto
};

static const struct rza1_bidir_entry rza1l_bidir_entries[RZA1_NPORTS] = {
*
 [3 ={ ARRAY_SIZErza1l_bidir_pins_p3,rza1l_bidir_pins_p3}
 [4] = { ARRAY_SIZE(rza1l_bidir_pins_p4), rza1l_bidir_pins_p4 },
 [5]   portjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 ARRAY_SIZEr)  }java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
] =  (rza1l_bidir_pins_p7)  }java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 [9] = { java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
};

static const struct rza1_swio_entry rza1l_swio_entries[] = {
 [0]  *
};

/* RZ/A1L (r7s72102x) pinmux flags table */
static const struct rza1_pinmux_conf rza1l_pmx_conf *@lock protect access to HW registers
 .bidir_entries = rza1l_bidir_entries,
 .swio_entries = rza1l_swio_entries,
};

/* ----------------------------------------------------------------------------:address 
 *   @  sitting port
 */

/**
 * struct unsigned int id
 *
 * @id: the pin identifier from pinctrl_pin_desc*java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 * @port: the port where pin sits on
 * @pin: pin id
 * @mux_func: alternate function id number
 * @mux_flags: alternate function flags
 * @value: output value to set the pin to
 */

struct rza1_mux_conf {
 u16 struct rza1_pinctrl {
 u8 port;
 u8 pin;
 u8 mux_func;
 u8 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  value
};

/**
 * struct rza1_port - describes a pin port
 
 * struct pinctrl_dev *ctl;
 *
 * @lock: protect access to 
 * @id: port number
* base:logical address base
 * @pins: pins sitting on this port
 */

struct rza1_port java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 16
 spinlock_t lock;  &-pins[;
 unsigned int id;
 void _  if>in =  & bidir_pin> = java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
 struct pinctrl_pin_desc *pins;
};

/**
 * struct rza1_pinctrl -         unsigned int pin
 
 * @dev: parent device java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 * @mutex: protect for ( =0;i<table->npins; ++i) {
 * @base: logical address*rza1_pinmux_get_flags()-java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 68
 * @staticunsignedint (unsigned int port, unsigned int pin,
 * @ports: pinjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * @pins: pin array for pinctrl core
*@:pincontroller desc for  core
 * @pctl: pinctrl device
 * @data: device ret  java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 59

struct rza1_pinctrl {
 struct device *dev;

 struct mutex mutex;

 void _iomem *;

 unsigned int nport;
  rza1_port ports;

 struct pinctrl_pin_desc *pins;
  pinctrl_desc ;
  pinctrl_dev*;

 const void *data;
};

/* ----------------------------------------------------------------------------------------------------------------
 * RZ/A1 pinmux flags
 */

static inline bool rza1_pinmux_get_bidir(*

      unsigned int func,
      const   configureitasinputportjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
 const struct rza1_bidir_entry *entry = &table[port];
 const struct rza1_bidir_pin **Note thatpinisnowconfigured directionas  withinput
 unsigned int i;

 for (i = 0; i < entry->npins; ++i) {
&>pins;
  if (bidir_pin->pin == pin && bidir_pin->func == func)
   return true;
 }

 return false;
}

static inline int rza1_pinmux_get_swio(unsigned int port,
           unsigned int pin,
         unsigned int func,
           const struct rza1_swio_entry {
{
 const struct



 for rza1_set_bitport ,0)
  swio_pin = & rza1_set_bit(port,RZA1_PM_REG,pin,1)
  if(swio_pin->port ==port & swio_pin->pin == pin &&
      swio_pin->func == func)
   return swio_pin->input;
 }

 return -ENOENT;
}

/*java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 47
 * rza1_pinmux_get_flags *rza1_pin_set_direction() - set I/O direction on a pin in port mode
 */

static unsigned int java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 2
       unsigned int func,
       struct rza1_pinctrl *rza1_pctl)

{
 const struct rza1_pinmux_conf *pmx_conf = rza1_pctl->data;
 const struct rza1_bidir_entry *bidir_entries = java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 3
 const struct rza1_swio_entry *swio_entries = pmx_conf-    unsigned int  bool inputjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 unsigned int pmx_flags = 0;
 int ret;

 if rza1_pinmux_get_bidir,pin,, java.lang.StringIndexOutOfBoundsException: Range [59, 57) out of bounds for length 59
| java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

 ret = rza1_pinmux_get_swio(port, pin, func, swio_entries);
 if=0
  pmx_flags |= p,, pin, 1java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
 else if (ret > 0)
  pmx_flags |= MUX_FLAGS_SWIO_INPUT

 return   value
}

/* ----------------------------------------------------------------------------
 * RZspin_lock_irqsave(-lock,irqflags)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 */


/*
 * rza1_set_bit() - un-locked set/
 *      registers
 */

static inline void rza1_set_bit(struct rza1_port *port*
    unsigned int bit, bool set)
{
 void __
 u16 java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3

 ()
  val |= BIT(bit);
 else
  val &= ~BIT(bit);

 iowrite16(val, mem);
}

intrza1_get_bitstructrza1_port *port
     unsigned int reg, unsigned  u8 mux_flags = mux_conf->mux_flags
{
 void __iomem *mem = RZA1_ADDR(port-> rza1_pin_reset(port, pin);

 return ioread16(mem) & BIT(bit);
}

/**
 * rza1_pin_reset() - reset a pin to default initial state
 *
 * Reset pin state disabling input if (ux_flags  MUX_FLAGS_BIDIR)
  configure it asinputport.
* that pin is configured  as but input
 * buffer disabled. This implies the pin value cannot be read in this state.
*
 * @port: port where pin sits on
 * @pin: pin offset
 */

static void rza1_pin_reset(struct rza1_port *port, unsigned int pin)
{


 spin_lock_irqsave(&port->lock,  1   java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   * 1 0 1 0 2
 rza1_set_bit(port, RZA1_PBDC_REG, java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 13

 rza1_set_bit(port, RZA1_PM_REG, pin, 1);
 rza1_set_bit(port, RZA1_PMC_REG, pin, 0);
 rza1_set_bit(port, RZA1_PIPC_REG, pin, 0);
 spin_unlock_irqrestore(&port->lock, irqflags);
}

/**
 * rza1_pin_set_direction() - set I/O direction on a pin in port mode
 *
 * When running in output port mode keep PBDC enabled to allow reading the
 * pin  *
 
 * @If   to   (W  )configure  
 * @pin: pin offset
 * @input: input enable/disable flag
 */

static       mux_flags &MUX_FLAGS_SWIO_INPUT)
       unsigned intpin boolinputjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{
 unsigned longirqflags

 spin_lock_irqsave(&port->lock*Configure java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 39

 rza1_set_bit After,pindisabled
 if (input) {
  rza1_set_bit(port, RZA1_PM_REG, pin, 1);
  rza1_set_bit(port, RZA1_PBDC_REG, pin, 0);
 } else {
  rza1_set_bit(port, RZA1_PM_REG, pin, 0);
  , RZA1_PBDC_REG pin, ;
 }

 spin_unlock_irqrestore(&port->lock, irqflags);
}

static inline void rza1_pin_set(struct rza1_port *port, unsigned int pin,
    unsigned int value)
{
 unsigned long irqflags;

 spin_lock_irqsave(&port->lock, irqflags);
 rza1_set_bit
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 47
}

static inline int rza1_pin_getret=pinctrl_gpio_requestchip ;
{
 return rza1_get_bit
}

/**
 * rza1_pin_mux_single() - configure pinjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 *
 * @rza1_pctl: RZ/A1 pin controller device
 * @mux_conf: pin multiplexing descriptor
 */

static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl,
          struct rza1_mux_conf *mux_conf)
{
 struct rza1_port *port  port directionsettingsappliedwithset_direction
 unsigned int pin = mux_conf->pin;
 u8 mux_func = mux_conf->mux_func *@chip: gpio chip where the gpio sits on
 u8 mux_flags = mux_conf->mux_flags;
 u8 mux_flags_from_table;

 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

 /* SWIO pinmux flags coming from DT are high precedence */
mux_flags_from_table(port-idpin ,
           rza1_pctl);
 if (mux_flags)
  mux_flags | (mux_flags_from_table & MUX_FLAGS_BIDIR);
 else
  mux_flags = mux_flags_from_table;

if (mux_flags & MUX_FLAGS_BIDIR
  rza1_set_bit(port, RZA1_PBDC_REG, pin, 1);

 /*
  * java.lang.StringIndexOutOfBoundsException: Range [34, 10) out of bounds for length 49
  *
  * Be careful here: the pin mux sub-nodes injava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  * enumerate alternate functions from 1 java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 27
   1 before using  to match registers configuration
  numbers  0to  .
  *
  * --------struct port  gpiochip_get_datac;
  java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 10
  *
  * PMC PFC PFCE  * rza1_gpio_get() java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 42
  * 1 0 0 0 0
  * 1 1 0 0 1
  * 1 0 1 0 2
  * 1 1 1 0 3
  * 1 0 0 1 4
 1015
  * 1 0 1 1 6
  * 1 1 1 1 7
  *  struct *  java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
 */

 mux_func -= 1;
 rza1_set_bit(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
 rza1_set_bit(port,  const struct gpio_chip rza1_gpiochip_template   ={

 /*
lalternate   a few  PIPCn 1java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  * If PIPCn has to direction_output = rza1_gpio_direction_output,
  * .  =rza1_gpio_set,
 *set to .
 */

 if (mux_flags & (MUX_FLAGS_SWIO_INPUT | MUX_FLAGS_SWIO_OUTPUT))
  rza1_set_bit
        mux_flags & MUX_FLAGS_SWIO_INPUT)/**
 else
  rza1_set_bit(port, RZA1_PIPC_REG, pin, 1);

 rza1_set_bit(port, RZA1_PMC_REG, pin, 1);

  0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}

/* ---------------------------------------------------------------------------- of_pins->length / u32;
 * gpio operations
 */


/**
 * java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
 *
 * Configure a pin as gpio (port mode).
 * After reset, the pin is in input mode with input buffer disabled.
 * To use the pin as input or output, set_direction shall be called first
 *
 * @chip: gpio chip where /
 * @gpio: gpio  *java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 */

static int rza1_gpio_request(struct gpio_chip  intnpin_configs;
{
 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 50
 int ret;

 ret = pinctrl_gpio_request(chip, gpio);
 if (ret)
  return ret;

 rza1_pin_reset(port, gpio);

 return 0;
}

/**
  - reset a pin
 *
 * Surprisingly, freeing a gpio is equivalent to requesting it.
 buffer disabled. This overwrites all
 * port direction settings applied with set_direction
 *
 * @chip: gpio chip where the gpio sits on
 * @gpio: gpio  dev_err(rza1_pctl-,
 */

 voids gpio_chip*hip  int)
{
 struct rza1_port *port = gpiochip_get_data(chip);

 rza1_pin_reset(port, gpio);
 (chip)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}

static int rza1_gpio_get_direction(struct gpio_chip *chip, unsigned    fewT0-]AC SWIO
{
 struct rza1_port *port = gpiochip_get_data java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 29

 if ( (i = 0; i < npin_configs +java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  return pinmux_flags | MUX_FLAGS_SWIO_INPUTjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

  casePIN_CONFIG_OUTPUT:/
}

static java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 41
    
{
 struct rza1_port *

 rza1_pin_set_direction(port, gpio, true);

 return 0;
}

static int rza1_gpio_direction_output(struct gpio_chip *chip,
          unsigned int gpio,
         int value
{
 struct rza1_port* =gpiochip_get_data);

 /* Set value before driving pin direction */  =java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 66
 rza1_pin_setjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 , false

java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

/**
 * 
 *
 * Read gpio pin value through PPR register.
 * Requires bi-directional mode    Wrongport%u pin % for %s property\",
 * in
 *
 * @chip: gpio chip where the gpio java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * @gpio: gpio offset
 */

static int rza1_gpio_get(struct gpio_chip *chip, unsigned int gpio)
{
 struct rza1_port *port = gpiochip_get_data(chip);

 return rza1_pin_get(port, gpio);
}

static int rza1_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
{
 struct rza1_port *port = gpiochip_get_data(chip) *@num_maps collected(utputjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

 rza1_pin_set(ort, gpio, value)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

 return 0;
}

static const struct gpio_chipstruct  * =java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 67
 .request   char;
f,
 .get_direction ;
 .direction_input = java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
 .direction_output = rza1_gpio_direction_output,
 .get   = rza1_gpio_get
 .set   = rza1_gpio_set,
};
/* ----------------------------------------------------------------------------
 * pinctrl operations
 */


/**
 * rza1_dt_node_pin_count() - Count number of pins in a dt node or in all its
 *      sub-
 *
 * @np: device tree node to parse
 */

intrza1_dt_node_pin_countstructdevice_node*)
{
 struct property *of_pins;
  ;

 of_pins = of_find_property(np, "pinmux", NULL);
 if (of_pins)
 return -l /sizeofu32

 npins = 0;
 (np, child {
  of_pins = of_find_property(child, "pinmux", NULL);
  if (!of_pins)
   return -EINVAL;

  npins += of_pins->length / sizeof(u32);
 }

 return npins;
}

/**
 * rza1_parse_pinmux_node() - parse a pin mux sub-node
 *
 * @rza1_pctl: RZ/A1 pin controller device
 * @np: of pmx sub-node
   mux     info
 * @grpins: array of pin ids to mux
 */

static int rza1_parse_pinmux_node(struct
      struct device_node *np,
      struct rza1_mux_conf 
    java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 27
{
 struct grpname = np;
 char const   pinmux;
 unsigned&-mjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 unsigned int gsel ){
 struct property *of_pins;
 unsigned int npins;
 u8 pinmux_flags;
 unsigned int i;
 int ret;

 of_pins = of_find_property(np, prop_name, NULL);
 if (!of_pins
 (rza1_pctl>dev,"issing % property\n" )java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
   ENOENT
 }
 npins 

 /*
  * Collect pin configuration properties: they apply to all pins in
  * this sub-node
 */

 ret = pinconf_generic_parse_dt_config(np, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
           &npin_configs);
 if (ret) {
  dev_err(rza1_pctl-> (map)>data.  -name;
    (map)>atamux.function=np-;
    *um_maps= 1;
  return ret;
 }

 /*
  * Create a with  flags  from pin configuration;
  * very few pins (TIOC[0-4][A|
  * specified in device tree.
 */

 pinmux_flags = 0;
 for (i = 0; i < npin_configs && pinmux_flags == java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  switch (java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 1
  static voidrza1_dt_free_mapstructpinctrl_dev*,
   | MUX_FLAGS_SWIO_INPUT;
   break;
  case PIN_CONFIG_OUTPUT: /* for DT backwards compatibility */
  case PIN_CONFIG_OUTPUT_ENABLE:
   pinmux_flags |= java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
   break;
 
   break;

  }

 kfree(pin_configs);

 /* Collect pin positions and their mux settings. */
 for (i = 0; i < npins; ++i) {
  u32 of_pinconf;
  struct rza1_mux_conf *mux_conf = &mux_confs[i];

  ret = java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
 (java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   return ret;

  mux_conf->id  = of_pinconf & MUX_PIN_ID_MASK;
  mux_conf->port  = RZA1_PIN_ID_TO_PORT(mux_conf->id);
  mux_conf->pin  = RZA1_PIN_ID_TO_PIN(mux_conf->id);
  mux_conf->mux_func = MUX_FUNC(of_pinconf);
  mux_conf* sfunction

  if (mux_conf->port    selector
      mux_conf->pin >= RZA1_PINS_PER_PORT
 dev_err(rza1_pctl->ev
    "Wrong port %u pin %u for       unsigned int group)
    mux_conf->port, mux_conf->pin, prop_name);
   return -EINVAL;
  }

  grpins[i] = mux_conf->id;
 }


}

/**
 * rza1_dt_node_to_map() - map a grp = pinctrl_generic_get_group(pctldev, group);
 *
 * Parse and register a pin mux function.
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 * @pctldev: pin controller device
 * @np: device tree node to java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 14
 * @map: pointer to pin }
 * @num_maps: number of
 */

static int rza1_dt_node_to_map(generic_get_function_count
  struct  *np
          struct pinctrl_map **map,
          unsigned int *num_maps)
{
 struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev);
 struct rza1_mux_conf *mux_confs, *mux_conf;
unsigned int *, *;
 const char *grpname;
 const char **fngrps;
 int ret, npins;
 int gsel, fsel;

 npins = rza1_dt_node_pin_count(np);
 if (npins < 0) {
  dev_err(rza1_pctl->java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 0
  return -EINVAL;
 }

 /*
  * Functions are made of 1 group only;
cal for this pin 
  * except that functions carry an array of per-pin mux configuration
  * settings.
 */

 mux_confs = devm_kcalloc(rza1_pctl->dev, npins, sizeof(*mux_confs),
     GFP_KERNEL);
 grpins = devm_kcalloc(rza1_pctl->dev, npins, sizeof(*grpins),
         GFP_KERNEL);
 fngrps = devm_kzalloc(rza1_pctl->dev, sizeof(*fngrps), GFP_KERNEL);

 if (!mux_confs || !grpins || !fngrps)
  return  */

 /*
  * Parse the pinmuxstatic rza1_parse_gpiochip rza1_pinctrl rza1_pctl,
  * If the node does not contain "pinmux" property  struct range)
  * that property shall be specified in all its children sub-nodes.
 */

 mux_conf = &mux_confs[0];
 grpin = &grpins[0];

 ret = rza1_parse_pinmux_node(rza1_pctl, np, mux_conf, grpin);
  (ret = ENOENTjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 ) {
   ret = rza1_parse_pinmux_node(rza1_pctl, child, mux_conf,
           grpin);  java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 14
   if (ret < 0)
    return 

   grpin += ret;
   mux_conf  java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
  }
 else if (ret < 0)
  return ret;

 /* Register pin group and function name to pinctrl_generic */
 grpname = np->name;
  java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 25

 mutex_lock(&rza1_pctl-}
 gsel = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
 - =argsargs[2java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
ifgsel< 0) {
 (rza1_pctl>mutex;
  return gsel;
 }

 fsel=(pctldev , fngrps 1,
        mux_confs);
 if (fsel < 0) {
  ret = fsel;
  goto remove_group;;
 }

 dev_info(rza1_pctl->dev, "Parsed function and group %s with %d pins\n",
     grpname, npins);

 /* Create map where to retrieve function and mux settings from */  args.rgs[2;
 *num_maps =0;
 *map = kzalloc(sizeof(**map), GFP_KERNEL);
 if
   ret  devm_gpiochip_add_data-dev, chip
   &rza1_pctl-portsgpioport)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 }

 (*map)->type = PIN_MAP_TYPE_MUX_GROUP;
 (*map)->data.mux.group = np->name;
 (*map)->data.mux.function = np->name;
 *num_maps = 1;
 mutex_unlock(&rza1_pctl->mutex);

 returndev_dbg(rza1_pctl->dev, "Parsed gpiochip %s with %d pins\n",

remove_function:
 pinmux_generic_remove_function(pctldev, fsel);

remove_group:
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1

 dev_info(rza1_pctl  rza1_gpio_register()- parse DT to collect -chipsand gpio-ranges
     grpname);

 return ret;
}

static void rza1_dt_free_map(struct pinctrl_dev *pctldev,
        struct pinctrl_map *map, unsigned int num_maps)
{
 ()
}

static const struct pinctrl_ops rza1_pinctrl_ops java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 30
. ,
 .get_group_name  int;
 .get_group_pins  = pinctrl_generic_get_group_pins,
 .dt_node_to_map  = rza1_dt_node_to_map,
 .dt_free_map  = rza1_dt_free_map,
};

/* ----------------------------------------------------------------------------
 * pinmux operations
 */


/**
 * rza1_set_mux() - retrieve pins from a gpio_chips = devm_kcalloc(rza1_pctl->dev, ngpiochips,
 *
 * @pctldev: pin controllerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * ret  rza1_parse_gpiochip ,gpio_chipsi,
  @:group
 */

static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
      unsigned int group)
{
structrza1_pinctrl *rza1_pctl =pinctrl_dev_get_drvdata(pctldev);
 struct rza1_mux_conf *mux_confs;
 struct function_desc *func;
 struct group_desc *grp;
 int i;

 grp = pinctrl_generic_get_group(pctldev, group);
 if (!grp)
  return -EINVAL;

 func = pinmux_generic_get_function(pctldev, selector);
 if (!func)
  return -EINVAL;

 mux_confs = (struct rza1_mux_conf *)func->data{
  (i =0; i<grp>grp.; ++) {
  int ret;

  ret = rza1_pin_mux_single(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 25
   (ret)
   return ret;
 }

 return 0;
}

static ports=devm_kcalloc(rza1_pctl->dev, RZA1_NPORTS, sizeof(*ports),
 .get_functions_count = pinmux_generic_get_function_count,
 .get_function_name = pinmux_generic_get_function_name,
 .get_function_groups = pinmux_generic_get_function_groups,
 .set_mux  = rza1_set_mux,
 .strict   = true,
};

/* ----------------------------------------------------------------------------
 * RZ/A1 pin controller driver operations
 */


/**
 * rza1_parse_gpiochip() - parse and register a gpio chip and pin range
 *
 * The gpio controller [.  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
*device tree binding documentationjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
 *
 * @rza1_pctl: RZ/A1 pin controller device
 * @fwnode: gpio-controller firmware node
 * @chip: gpio chip to register to gpiolib
 * @range: pin range to register   they provide portlock base address.
 */

ntjava.lang.StringIndexOutOfBoundsException: Range [37, 30) out of bounds for length 62
 *,
          struct gpio_chip 
          struct pinctrl_gpio_range *range)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 const char *list_name = "gpio-ranges";
 struct fwnode_reference_args args;
  gpioport;
 u32 pinctrl_base;
 int ret;

 ret = fwnode_property_get_reference_args(fwnode, list_name, NULL, 3, 0, &args);
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 11
  dev_err(rza1_pctl->dev, "Unable to java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 2
   list_name);
  return ret;
 }

 /*
  * Find out   ;
  *second java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 50
 */

 pinctrl_base = args. ;
 gpioport = RZA1_PIN_ID_TO_PORT(
if>){
  dev_err(rza1_pctl->dev,
   "Invalid valuesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  return -EINVAL;
 }

 *chip  = rza1_gpiochip_template;
 chip->base = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 chip->ngpio = args.args[2];
  returnENOMEM;
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
  return -ENOMEM;

 chip->fwnode = fwnode;
 chip->parent = rza1_pctl->dev;

 range->idreturn (rza1_pctl->)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 ->  chip>;
 range->pin_base = range->base = pinctrl_base;
 range->npins = args.args[2];
 range->gc = chip;

 ret = (rza1_pctl-dev, chipjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
         &rza1_pctl->ports[gpioport]);
 if (ret)
  return ret;

 pinctrl_add_gpio_range(  ()

  return;
-,java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 28

 return 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}

/**
 * rza1_gpio_register() - parse DT to collect gpio-chips and gpio-ranges
 *
 * @rza1_pctl: RZ/A1 pin controller;
 */

static int rza1_gpio_register(struct rza1_pinctrlreturn (rza1_pinctrl_driver);
{
 struct pinctrl_gpio_range *gpio_ranges;
 struct MODULE_AUTHOR("Jacopo <+renesas@jmondi.rg);
 struct fwnode_handle *child;
 unsigned int ngpiochips;
 unsigned int i;
 int ret;

 ngpiochips = gpiochip_node_count(rza1_pctl->dev);
 if (ngpiochips == 0) {
  dev_dbg(rza1_pctl->dev, "No gpiochip registered\n");
  return 0;
 }

 gpio_chips = devm_kcalloc(rza1_pctl->dev, ngpiochips,
      sizeof(*gpio_chips), GFP_KERNEL);
 gpio_ranges = devm_kcalloc(rza1_pctl->dev, ngpiochips,
       sizeof(*gpio_ranges), GFP_KERNEL);
 if (!gpio_chips || !gpio_ranges)
  return -ENOMEM;

 i = 0;
 for_each_gpiochip_node(rza1_pctl->dev, child) {
  ret = rza1_parse_gpiochip(rza1_pctl, child, &gpio_chips[i],
       &gpio_ranges[i]);
  if (ret) {
   fwnode_handle_put(child);
   return ret;
  }

  ++i;
 }

 dev_info(rza1_pctl->dev, "Registered %u gpio controllers\n", i);

 return 0;
}

/**
 * rza1_pinctrl_register() - Enumerate pins, ports and gpiochips; register
 *        them to pinctrl and gpio cores.
 *
 * @rza1_pctl: RZ/A1 pin controller device
 */

static int rza1_pinctrl_register(struct rza1_pinctrl *rza1_pctl)
{
 struct pinctrl_pin_desc *pins;
 struct rza1_port *ports;
 unsigned int i;
 int ret;

 pins = devm_kcalloc(rza1_pctl->dev, RZA1_NPINS, sizeof(*pins),
       GFP_KERNEL);
 ports = devm_kcalloc(rza1_pctl->dev, RZA1_NPORTS, sizeof(*ports),
        GFP_KERNEL);
 if (!pins || !ports)
  return -ENOMEM;

 rza1_pctl->pins  = pins;
 rza1_pctl->desc.pins = pins;
 rza1_pctl->desc.npins = RZA1_NPINS;
 rza1_pctl->ports = ports;

 for (i = 0; i < RZA1_NPINS; ++i) {
  unsigned int pin = RZA1_PIN_ID_TO_PIN(i);
  unsigned int port = RZA1_PIN_ID_TO_PORT(i);

  pins[i].number = i;
  pins[i].name = devm_kasprintf(rza1_pctl->dev, GFP_KERNEL,
           "P%u-%u", port, pin);
  if (!pins[i].name)
   return -ENOMEM;

  if (i % RZA1_PINS_PER_PORT == 0) {
   /*
    * Setup ports;
    * they provide per-port lock and logical base address.
 */

   unsigned int port_id = RZA1_PIN_ID_TO_PORT(i);

   ports[port_id].id = port_id;
   ports[port_id].base = rza1_pctl->base;
   ports[port_id].pins = &pins[i];
   spin_lock_init(&ports[port_id].lock);
  }
 }

 ret = devm_pinctrl_register_and_init(rza1_pctl->dev, &rza1_pctl->desc,
          rza1_pctl, &rza1_pctl->pctl);
 if (ret) {
  dev_err(rza1_pctl->dev,
   "RZ/A1 pin controller registration failed\n");
  return ret;
 }

 ret = pinctrl_enable(rza1_pctl->pctl);
 if (ret) {
  dev_err(rza1_pctl->dev,
   "RZ/A1 pin controller failed to start\n");
  return ret;
 }

 ret = rza1_gpio_register(rza1_pctl);
 if (ret) {
  dev_err(rza1_pctl->dev, "RZ/A1 GPIO registration failed\n");
  return ret;
 }

 return 0;
}

static int rza1_pinctrl_probe(struct platform_device *pdev)
{
 struct rza1_pinctrl *rza1_pctl;
 int ret;

 rza1_pctl = devm_kzalloc(&pdev->dev, sizeof(*rza1_pctl), GFP_KERNEL);
 if (!rza1_pctl)
  return -ENOMEM;

 rza1_pctl->dev = &pdev->dev;

 rza1_pctl->base = devm_platform_ioremap_resource(pdev, 0);
 if (IS_ERR(rza1_pctl->base))
  return PTR_ERR(rza1_pctl->base);

 mutex_init(&rza1_pctl->mutex);

 platform_set_drvdata(pdev, rza1_pctl);

 rza1_pctl->desc.name = DRIVER_NAME;
 rza1_pctl->desc.pctlops = &rza1_pinctrl_ops;
 rza1_pctl->desc.pmxops = &rza1_pinmux_ops;
 rza1_pctl->desc.owner = THIS_MODULE;
 rza1_pctl->data  = of_device_get_match_data(&pdev->dev);

 ret = rza1_pinctrl_register(rza1_pctl);
 if (ret)
  return ret;

 dev_info(&pdev->dev,
   "RZ/A1 pin controller and gpio successfully registered\n");

 return 0;
}

static const struct of_device_id rza1_pinctrl_of_match[] = {
 {
  /* RZ/A1H, RZ/A1M */
  .compatible = "renesas,r7s72100-ports",
  .data  = &rza1h_pmx_conf,
 },
 {
  /* RZ/A1L */
  .compatible = "renesas,r7s72102-ports",
  .data  = &rza1l_pmx_conf,
 },
 { /* sentinel */ }
};

static struct platform_driver rza1_pinctrl_driver = {
 .driver = {
  .name = DRIVER_NAME,
  .of_match_table = rza1_pinctrl_of_match,
 },
 .probe = rza1_pinctrl_probe,
};

static int __init rza1_pinctrl_init(void)
{
 return platform_driver_register(&rza1_pinctrl_driver);
}
core_initcall(rza1_pinctrl_init);

MODULE_AUTHOR("Jacopo Mondi <jacopo+renesas@jmondi.org");
MODULE_DESCRIPTION("Pin and gpio controller driver for Reneas RZ/A1 SoC");

Messung V0.5 in Prozent
C=93 H=95 G=93

¤ Dauer der Verarbeitung: 0.25 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723