I need to make a device that can check the state of 40 SPST switches and then send this data to a computer via USB.

The core of this board will be the SX28 micro-controller. I plan on making it check the states of the 40 SPST switches, serialize the data, send the data to a PC via USB specifications for the computer to handle.

The part throwing me for the biggest loop is handling 40 switches while the SX28 has only 20 ( -1 for USB connection) possible inputs to the registers.

I come from a Programmer and Server Management background so the solution that first comes to mind is, have 2 slave SX28 chips checking 20 switches each then send their serialized data back to a master SX28 chip that polls the slaves and updates the PC via USB.

Does anyone have any recommendations or ideas how to pull this off more efficiently?

Also does anyone know a great tutorial or document explaining how to work with the USB interface and how to process the signal on Linux?

there are number of alternatives, i still don't know what you need.
if you want to add bunch of inputs and outputs you can use expanders. if you don't like I2C for example and want something possibly simpler, then generic chips will be an interesting option (very simple to implement and program):

74HC595 is SIPO (Serial In - Parallel Out) as shown here. note that you need only three pins to drive any number of outputs, each chip you add, will give you another 8 outputs. regardless of number of outputs you get, only 3 pins are required from microcontroller (data, clock and latch).

74HC597 is PISO (parallel in - serial out). the idea is the same, you get bunch of inputs (each chips give you 8 inputs) and you cascade them all you like. then use same shifting method to bring the values of all those inputs into your microcontroller. you can reuse pins used for outputs.

if saving pin count on mcu is goal, you can resort to external chips like 74HC138 or 74HC238. they need 3pins and give you 8 outputs. using additional 5-pins as inputs, you can easily scan 8*5=40 switches using only one port (3+5=8 pins). diodes are only needed when multiple switches can be activated at the same time.