blob: 1fd6fdaac44a8a4befecba996e541b41a22a8046 [file] [log] [blame]
Angel Pons560796c2020-04-03 01:22:52 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Piotr Króldcd2f172016-05-27 12:04:13 +02002
Kyösti Mälkkidf84a282020-06-18 19:26:05 +03003#include <gpio.h>
Piotr Króldcd2f172016-05-27 12:04:13 +02004#include "gpio_ftns.h"
5
Kyösti Mälkkic27df872017-01-16 19:58:53 +02006int get_spd_offset(void)
7{
8 u8 index = 0;
Michał Żygowskiaf258cc2019-12-01 17:42:04 +01009 /*
10 * One SPD file contains all 4 options, determine which index to
Kyösti Mälkkic27df872017-01-16 19:58:53 +020011 * read here, then call into the standard routines.
12 */
Kyösti Mälkkidf84a282020-06-18 19:26:05 +030013 if (gpio_get(GPIO_49))
14 index |= 1 << 0;
15 if (gpio_get(GPIO_50))
16 index |= 1 << 1;
Kyösti Mälkkic27df872017-01-16 19:58:53 +020017
18 return index;
19}