mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Thomas Gleixner](/assets/img/avatar_default.png)
Based on 1 normalized pattern(s): 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 246 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* This file is part of the ROHM BH1770GLC / OSRAM SFH7770 sensor driver.
|
|
* Chip is combined proximity and ambient light sensor.
|
|
*
|
|
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
*
|
|
* Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
|
|
*/
|
|
|
|
#ifndef __BH1770_H__
|
|
#define __BH1770_H__
|
|
|
|
/**
|
|
* struct bh1770_platform_data - platform data for bh1770glc driver
|
|
* @led_def_curr: IR led driving current.
|
|
* @glass_attenuation: Attenuation factor for covering window.
|
|
* @setup_resources: Call back for interrupt line setup function
|
|
* @release_resources: Call back for interrupte line release function
|
|
*
|
|
* Example of glass attenuation: 16384 * 385 / 100 means attenuation factor
|
|
* of 3.85. i.e. light_above_sensor = light_above_cover_window / 3.85
|
|
*/
|
|
|
|
struct bh1770_platform_data {
|
|
#define BH1770_LED_5mA 0
|
|
#define BH1770_LED_10mA 1
|
|
#define BH1770_LED_20mA 2
|
|
#define BH1770_LED_50mA 3
|
|
#define BH1770_LED_100mA 4
|
|
#define BH1770_LED_150mA 5
|
|
#define BH1770_LED_200mA 6
|
|
__u8 led_def_curr;
|
|
#define BH1770_NEUTRAL_GA 16384 /* 16384 / 16384 = 1 */
|
|
__u32 glass_attenuation;
|
|
int (*setup_resources)(void);
|
|
int (*release_resources)(void);
|
|
};
|
|
#endif
|