mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
44486b48b0
Instead of defining an enumeration with the FW specific values for the different clock rates, use the actual frequency instead. Also add a boolean to specify whether the clock is XTAL or not. Change all board files to reflect this. Signed-off-by: Luciano Coelho <luca@coelho.fi> [Eliad - small fixes, update board file changes] Signed-off-by: Eliad Peller <eliad@wizery.com> Tested-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Kalle Valo <kvalo@codeaurora.org> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
84 lines
2.0 KiB
C
84 lines
2.0 KiB
C
/*
|
|
* This file is part of wl12xx
|
|
*
|
|
* Copyright (C) 2009 Nokia Corporation
|
|
*
|
|
* Contact: Luciano Coelho <luciano.coelho@nokia.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
* 02110-1301 USA
|
|
*
|
|
*/
|
|
|
|
#ifndef _LINUX_WL12XX_H
|
|
#define _LINUX_WL12XX_H
|
|
|
|
#include <linux/err.h>
|
|
|
|
struct wl1251_platform_data {
|
|
int power_gpio;
|
|
/* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
|
|
int irq;
|
|
bool use_eeprom;
|
|
};
|
|
|
|
struct wl12xx_platform_data {
|
|
int irq;
|
|
u32 irq_trigger;
|
|
bool ref_clock_xtal; /* specify whether the clock is XTAL or not */
|
|
u32 ref_clock_freq; /* in Hertz */
|
|
u32 tcxo_clock_freq; /* in Hertz, tcxo is always XTAL */
|
|
bool pwr_in_suspend;
|
|
};
|
|
|
|
#ifdef CONFIG_WILINK_PLATFORM_DATA
|
|
|
|
int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
|
|
|
|
struct wl12xx_platform_data *wl12xx_get_platform_data(void);
|
|
|
|
int wl1251_set_platform_data(const struct wl1251_platform_data *data);
|
|
|
|
struct wl1251_platform_data *wl1251_get_platform_data(void);
|
|
|
|
#else
|
|
|
|
static inline
|
|
int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline
|
|
struct wl12xx_platform_data *wl12xx_get_platform_data(void)
|
|
{
|
|
return ERR_PTR(-ENODATA);
|
|
}
|
|
|
|
static inline
|
|
int wl1251_set_platform_data(const struct wl1251_platform_data *data)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline
|
|
struct wl1251_platform_data *wl1251_get_platform_data(void)
|
|
{
|
|
return ERR_PTR(-ENODATA);
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|