0abc4f0c4a
Why I did it Some of the platform vendors use FPGA in the HW design. This FPGA is connected to the CPU via I2C bus. Adding a common module and a driver to be used for such FPGA in PDDF. How I did it Added 'pddf_fpgai2c_module' and 'pddf_fpgai2c_driver' kernel modules which takes the platform dependent data from PDDF JSON files and creates an I2C client for the FPGA. How to verify it Any platform having such an FPGA and brought up using PDDF would use these kernel modules. The detail representation of such a device in PDDF JSON file is covered in the HLD.
31 lines
944 B
C
31 lines
944 B
C
/*
|
|
* Copyright 2019 Broadcom.
|
|
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* 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.
|
|
*
|
|
* Description:
|
|
* Platform FPGA I2C defines/structures header file
|
|
*/
|
|
|
|
#ifndef __PDDF_FPGAI2C_DEFS_H__
|
|
#define __PDDF_FPGAI2C_DEFS_H__
|
|
|
|
/* FPGAI2C DATA - DATA FOR I2C FPGA CLIENT READ/WRITE*/
|
|
typedef struct FPGAI2C_DATA
|
|
{
|
|
struct mutex fpga_lock;
|
|
uint16_t reg_addr;
|
|
}PDDF_FPGAI2C_DATA;
|
|
|
|
|
|
#endif //__PDDF_FPGAI2C_DEFS_H__
|