1. Because you can operate the AVR at 5V while the Raspberry controls the I2C voltage at 3.3V, so there's no need for level shifters.
2. You can connect multiple devices to the same Raspberry over I2C.
How to do it? There are a couple of steps involved so it will take a bit of your time.
1. You'll have to setup I2C on your Raspberry. This link explains how to do that.
2. If you don't have an AVR programmer, then you might want to start by setting up a simple circuit and install avrdude. Explained here. This will also install wiringpi and gpio, two very useful tools. If you'd like to have a better AVR programmer, you might want to build one, or buy a commercial programmer.
3. Now having wiringpi, gpio and avrdude installed, download the slave AVR library for ATtiny-s using the USI interface from here. This library actually works. Put it where your gcc-avr can see it. Eg. where your ATtiny C code is.
4. Install wiringpi I2C. Or any I2C library you wish to use for communication. The AVR code below is optimized for the wiringPi library.
5. Use 100kHz on the I2C bus. Type this command:
The I2C communication was reliable in my tests when the ATtiny operated at 8 MHz. Don't go below this if you want reliable data transfer.
You'll have to set fuses for this, since it's not the default setting on an ATtiny, this site explains how to do it. The avrdude fuse options are the following:
When information is received from the master, which is the Raspberry Pi, it is stored in the input_buffer variable on the ATtiny, the slave.
This communication is set up to send 8 bits at a time (which is compatible with the wiringPi library).
Now in your main you call the usi_twi_slave method after initializations are done. This will take care of the interrupt handling when the master device sends a command. For example your main could look like this: