soc_common.c (552c69b36ebd966186573b9c7a286b390935cce1) soc_common.c (b9762bebc6332b40c33e03dea03e30fa12d9e3ed)
1/*======================================================================
2
3 Common support code for the PCMCIA control functionality of
4 integrated SOCs like the SA-11x0 and PXA2xx microprocessors.
5
6 The contents of this file are subject to the Mozilla Public
7 License Version 1.1 (the "License"); you may not use this file
8 except in compliance with the License. You may obtain a copy of

--- 337 unchanged lines hidden (view full) ---

346 skt->nr);
347 /* restore the previous state */
348 WARN_ON(skt->ops->configure_socket(skt, &skt->cs_state));
349 return ret;
350 }
351
352 if (ret == 0) {
353 struct gpio_desc *descs[2];
1/*======================================================================
2
3 Common support code for the PCMCIA control functionality of
4 integrated SOCs like the SA-11x0 and PXA2xx microprocessors.
5
6 The contents of this file are subject to the Mozilla Public
7 License Version 1.1 (the "License"); you may not use this file
8 except in compliance with the License. You may obtain a copy of

--- 337 unchanged lines hidden (view full) ---

346 skt->nr);
347 /* restore the previous state */
348 WARN_ON(skt->ops->configure_socket(skt, &skt->cs_state));
349 return ret;
350 }
351
352 if (ret == 0) {
353 struct gpio_desc *descs[2];
354 int values[2], n = 0;
354 DECLARE_BITMAP(values, 2);
355 int n = 0;
355
356 if (skt->gpio_reset) {
357 descs[n] = skt->gpio_reset;
356
357 if (skt->gpio_reset) {
358 descs[n] = skt->gpio_reset;
358 values[n++] = !!(state->flags & SS_RESET);
359 __assign_bit(n++, values, state->flags & SS_RESET);
359 }
360 if (skt->gpio_bus_enable) {
361 descs[n] = skt->gpio_bus_enable;
360 }
361 if (skt->gpio_bus_enable) {
362 descs[n] = skt->gpio_bus_enable;
362 values[n++] = !!(state->flags & SS_OUTPUT_ENA);
363 __assign_bit(n++, values, state->flags & SS_OUTPUT_ENA);
363 }
364
365 if (n)
366 gpiod_set_array_value_cansleep(n, descs, values);
367
368 /*
369 * This really needs a better solution. The IRQ
370 * may or may not be claimed by the driver.

--- 523 unchanged lines hidden ---
364 }
365
366 if (n)
367 gpiod_set_array_value_cansleep(n, descs, values);
368
369 /*
370 * This really needs a better solution. The IRQ
371 * may or may not be claimed by the driver.

--- 523 unchanged lines hidden ---