công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

UM0851 bảng dữ liệu(PDF) 89 Page - STMicroelectronics

tên linh kiện UM0851
Giải thích chi tiết về linh kiện  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  STMICROELECTRONICS [STMicroelectronics]
Trang chủ  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 bảng dữ liệu(HTML) 89 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 85Page - STMicroelectronics UM0851 Datasheet HTML 86Page - STMicroelectronics UM0851 Datasheet HTML 87Page - STMicroelectronics UM0851 Datasheet HTML 88Page - STMicroelectronics UM0851 Datasheet HTML 89Page - STMicroelectronics UM0851 Datasheet HTML 90Page - STMicroelectronics UM0851 Datasheet HTML 91Page - STMicroelectronics UM0851 Datasheet HTML 92Page - STMicroelectronics UM0851 Datasheet HTML 93Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 89 / 245 page
background image
UM0851
Communication device drivers
Doc ID 16604 Rev 2
89/245
SPI shows up in sysfs in several locations:
●
/sys/devices/.../CTLR ... physical node for a given SPI controller
●
/sys/devices/.../CTLR/spiB.C ... spi_device on bus "B", chipselect C, accessed through
CTLR.
●
/sys/bus/spi/devices/spiB.C ... symlink to that physical .../CTLR/spiB.C device
●
/sys/devices/.../CTLR/spiB.C/modalias ... identifies the driver that should be used with
this device (for hot plug/cold plug)
●
/sys/bus/spi/drivers/D ... driver for one or more spi*.* devices.
●
/sys/class/spi_master/spiB ... symlink (or actual device node) to a logical node which
could hold class related state for the controller managing bus "B". All spiB.* devices
share one physical SPI bus segment, with SCLK, MOSI, and MISO.
Linux SPI framework provides some functions that are used for registering and un-
registering SPI slave drivers. It also provides some functions for transferring data over the
SPI bus. We will examine these functions one by one with examples from the EEPROM
driver.
Adding a new slave device
The SPI controller driver and slave driver need some board-specific data to work correctly.
This data is present in arch/arm/mach-spear300/spear300.c or arch/arm/mach-
spear600/spear600.c.
There are two types of platform information:
●
Controller_data: this is required by the SPI controller driver. This structure is controller
driver specific and for adding a new slave device, it must be supplied.
/* to be implemented if chip select is configurable. Currently it is
automatically given.*/
static void spidev_chip_select(u32 command)
{
}
/*struct spear_spi_chip is present in drivers/spi/spr_ssp_pl022.h*/
static struct spear_spi_chip m25_hw = {
.Interface= MOTOROLA_SPI, /* framework supports only MOTOROLA_SPI */
.cs_control= m25_chip_select, /* Slave driver provides cs_control
function, and this function must enable
or disable chip select of the slave chip */
.dma_burst_size = BURST_SIZE_1, /* framework Dma burst size supported by SPI slave
chip supports */
};
●
Platform_data: this is defined and required by the slave driver. The driver can keep
important data here for programming the slave device.
static struct spi_eeprom m25_info = {
.byte_len = 1024*1024,
.name = "m25",
.page_size = 256,
.sector_size = 0x10000,
.flags = EE_ADDR3,
};
These two structures are added to struct spi_board_info, which is registered with the kernel.
struct spi_board_info is declared by the Linux SPI framework. You must create an instance
of this structure for every device which will use the SPI framework.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com